Catalyzes the hydrolysis of all eight canonical ribonucleoside triphosphates (NTP) and deoxyribonucleoside triphosphates (dNTP) to their corresponding nucleoside monophosphates ((d)NMP) and PPi and subsequently hydrolyzes the resultant PPi to Pi. The NTPase activity with deoxyribonucleoside triphosphates as substrate is higher than corresponding ribonucleoside triphosphates. dGTP is the best substrate among the deoxyribonucleoside triphosphates, and GTP is the best among the ribonucleoside triphosphates. diphosphate + H2O = H(+) + 2 phosphate a ribonucleoside 5'-triphosphate + H2O = a ribonucleoside 5'-phosphate + diphosphate + H(+) a 2'-deoxyribonucleoside 5'-triphosphate + H2O = a 2'-deoxyribonucleoside 5'-phosphate + diphosphate + H(+) Inhibited by AMPCPP (alpha,beta-methyleneadenosine triphosphate). Optimum temperature is about 80 degrees Celsius. MazG is very stable at high temperature, and no change is detected up to 85 degrees Celsius. Homodimer. Belongs to the nucleoside triphosphate pyrophosphohydrolase family.