yen gain on flight to safety as Hamas attack dents sentiment