The first one is male, the second looks male to me.. you should be careful as they look in quite poor condition. The sunken bellies could indicate worms, the shredded fins could result in fin-rot and they are quite susceptible to white spot. They will really appreciate your plants.
It's worth making sure how to sex fish before going to buy them