NAD(P)H pyrophosphatase that hydrolyzes NADH into NMNH and AMP, and NADPH into NMNH and 2',5'-ADP. Has a marked preference for the reduced pyridine nucleotides. Does not show activity toward NAD-capped RNAs; the NAD-cap is an atypical cap present at the 5'-end of some RNAs. H2O + NADH = AMP + 2 H(+) + reduced beta-nicotinamide D-ribonucleotide H2O + NAD(+) = AMP + beta-nicotinamide D-ribonucleotide + 2 H(+) H2O + NADPH = adenosine 3',5'-bisphosphate + 2 H(+) + reduced beta-nicotinamide D-ribonucleotide Divalent metal cations. Mg(2+) or Mn(2+). Highly expressed in metastasis-suppressed chromosome 6 melanoma hybrids. Belongs to the Nudix hydrolase family.