they eat fish and get quite fat. I have gad luck feeding them silversides and goldfish but a diet of exclusively goldfish should be avoided. Sexing a snake is not something that can be taught via the internet it really has to be taught to you and it is different for every snake species. To make a long story short though, it involves a lubricated probe.
It sounds like yours are a little on the small side and if they are malnourished it may be best to let them go. If you do decide to keep them though get a basking light for them with a low wattage bulb and keep one side of their tank in the low 90's and the other side in the low 80's. Give them a humidity box to cool off in as well and a large water bowl where you should put the fish in for them to hunt. You may need to feed them separately too so different cages may be required but if you keep a close eye on them during feeding time to make sure they dont start eating the same fish then it should be okay.
Good luck