In six baskets there are pears, plums and apples. The number of plums in each basket is equal to the total number of apples in the other baskets. The number of apples in each basket is equal to the total number of pears in the other baskets. Prove that the total number of fruits is divisible by 31.