You can but it won't stay for long. I've tried alot of different ways of IDing (permanent marker on light legs, blu kot on back feathers etc) they grow so fast and are in water so much, nothing stays for long.
If I need to ID someone then I use colored zip ties. I get them at Dollar Tree and they are not great (for typical zip tie usage) but they usually stay on. With growing birds, you need to keep a close eye to make sure they don't become tight as they grow.
People also use velcro ties which are a bit easier to remove. Just make sure that anything you use can't be swallowed by them.
If you use nail polish let each dry before letting them together. I'd maybe try it on a toenail, if its good quality it'll stay for a while. You could do a left foot on one, a right foot on one and nothing on the other.