Program for checking if arrays have the same sums