It is not the food itself that causes sterility but rather the subsequent fat deposits around reproductive organs (ovaries, gonads). Both the aforementioned foods are fine if fed in moderation. Problems (sterility among them) arise when they form the fishes' staple diet.