Unforutnately, they both have dropsy, a highly lethal internal bacterial infection. Honestly, it does not look good for either of these guys, especially the one that is alrady floating upside down. If you want, you can try treating with tetracycline, as it is a strong antibiotic. Also, and even more desirable, is if it will still eat, feed it some antibacterial medicine.
You should definately isolate the vish who is upside down, as when he dies fish may nibble at his body spreading the infection. Idealy, isolate both.
How long have you had your tank set up for?
Here is some more info for you. I am not the writer of this.
Dropsy
Symptoms
This disease is characterised by a swollen or hollow abdomen. Swollen areas may exhibit a 'pine-cone' appearance caused by the fishes scales sticking out. Fish may also appear off-colour and listless, and may stop feeding. The swelling caused by this disease may often be mistaken for a pregnant or egg-carrying fish. Gouramies and Cyprinids (barbs, danios, etc) are prone to this disease.
Causes
Dropsy is a condition with several possible causes. It may frequently be caused by internal infections by a number of different bacterial species. Viruses have also been associated with the disease. Poor water quality and/or diet may trigger the disease. If the problem has been caused by permanant damage to the kidney, then treating the infection will not eradicate the symptoms.
Possible cures
This disease must be caught early to maximise the chance of saving an affected fish, and even then the disease is difficult to cure. Previously, antibiotics prescribed by a vet were the only means of treatment for those countries (including the UK) where antibiotics cannot be purchased over-the-counter. There are now commercially available remedies which may help. These include Interpet #9 Anti Internal Bacteria and Waterlife's Octozin. The addition of salt (1 tsp/gallon) may also be beneficial.
Dropsy is not usually considered to be particularly contagious, so it should not spread to other healthy fish - dead fish should be removed immediately however, to avoid cannibalism. However, bear in mind that there is more than one cause of dropsy, so in some cases the infective agent could be contagious. It is preferable to carry out treatment in a hospital tank where available.