num = int(input())

total1 = 0
total2 = 0

for i in range(num):
    num1 = int(input())
    total1 += num1

for i in range(num):
    num2 = int(input())
    total2 += num2

if total1 == total2:
    print(f"Yes, sum = {total1}")
else:
    print(f"No, diff = {abs(total1 - total2)}")
