n = int(input())
sum_even = 0
sum_odd = 0
for i in range(1, n + 1):
    num = int(input())
    if i % 2 == 0:
        sum_even += num
    else:
        sum_odd += num
if sum_even == sum_odd:
    print('Yes')
    print(f'Sum = {sum_odd}')
else:
    print('No')
    print(f'Diff = {abs(sum_odd - sum_even)}')

90ac5136b7ddde87e66efef9b1362951388ef6a1
<mask token>

<mask token>
for i in range(1, n + 1):
    num = int(input())
    if i % 2 == 0:
        sum_even += num
    else:
        sum_odd += num
if sum_even == sum_odd:
    print('Yes')
    print(f'Sum = {sum_odd}')
else:
    print('No')
    print(f'Diff = {abs(sum_odd - sum_even)}')

n = int(input())
sum_even = 0
sum_odd = 0
for i in range(1, n + 1):
    num = int(input())
    if i % 2 == 0:
        sum_even += num
    else:
        sum_odd += num
if sum_even == sum_odd:
    print('Yes')
    print(f'Sum = {sum_odd}')
else:
    print('No')
    print(f'Diff = {abs(sum_odd - sum_even)}')
