Catalyzes the deformylation of the formylaminopyrimidine N-formyl-4-amino-5-aminomethyl-2-methylpyrimidine (FAMP) to give the corresponding aminopyrimidine. H2O + N-formyl-4-amino-5-aminomethyl-2-methylpyrimidine = 4-amino-5-aminomethyl-2-methylpyrimidine + formate Binds 2 Zn(2+) or Co(2+) ions per subunit. kcat is 14 min(-1). Cofactor biosynthesis; thiamine diphosphate biosynthesis. Belongs to the peptidase M20A family.