A phone with UMTS 3G 2100 band will work in both countries, the cheapest phones won't have this. An Irish Vodafone SIM would be reasonable value for Ireland. Japan is a bit of an outlier, you'd probably have to get a local SIM there, I doubt if any European SIM would give good value there.