Catalyzes the dephosphorylation of different purine nucleotides (GMP and IMP). a ribonucleoside 5'-phosphate + H2O = a ribonucleoside + phosphate Magnesium. Can also use other divalent metal cations as manganese, cobalt or zinc. Belongs to the HAD-like hydrolase superfamily. Extended N-terminus. Extended N-terminus.