Japan rallies past Puerto Rico in ninth