Converts UTP and GlcNAc-1-P into UDP-GlcNAc, and UTP and GalNAc-1-P into UDP-GalNAc. Isoform AGX1 has 2 to 3 times higher activity towards GalNAc-1-P, while isoform AGX2 has 8 times more activity towards GlcNAc-1-P (By similarity). H(+) + N-acetyl-alpha-D-galactosamine 1-phosphate + UTP = diphosphate + UDP-N-acetyl-alpha-D-galactosamine H(+) + N-acetyl-alpha-D-glucosamine 1-phosphate + UTP = diphosphate + UDP-N-acetyl-alpha-D-glucosamine Nucleotide-sugar biosynthesis; UDP-N-acetyl-alpha-D-glucosamine biosynthesis; UDP-N-acetyl-alpha-D-glucosamine from N-acetyl-alpha-D-glucosamine 1-phosphate: step 1/1. Monomer and homodimer. Isoform AGX1 is a homodimer. Isoform AGX2 is a monomer (By similarity). Belongs to the UDPGP type 1 family.