Japan registered a ten-fold surge in trade deficit at $17.8 billion (2.38 trillion yen) in May—the highest monthly increase since January 2014—in the wake of higher prices and a weaker yen.