Both eat a wide range of foods. Everything from commercial flakes and pellets to frozen foods (bloodworms, small shrimp, etc.) to veggies (blanched peas, lettuce, zucchini, spinach, carrots, etc.). If you check google you should be able to find sites devoted to these fish that will list a more specific diet.
Most quality community-fish flake or granual foods supply all the nutrition that your fish require. You can "treat" them with frozen worms and brineshrimp. For veggies, you can use garden peas with the skins removed.