Dephosphorylates preferentially the 5'- and 2'(3')-phosphates of uracil and thymine (deoxy)ribonucleotide monophosphates (PubMed:10899995, PubMed:16004879). Shows low activity toward dGMP and marginal activity toward dIMP (PubMed:10899995, PubMed:16004879). . This is the function of NT5M (5',3'-nucleotidase, mitochondrial, ENSG00000205309).