North Korea fired two ballistic missiles into the sea in its latest weapons test in the early hours of Thursday, South Korea and Japan said.