What is the ruling on the length of nails of fingers and feet if we are to pray namaz?

They should be clean and tidy if they happen to be long, and if one can’t keep them clean then they need to be trimmed short enough so that dirt does not gather there