for _ in range(int(input())): a=input().split('+') if int(a[0])+int(a[1])==int(input()): print('yes') continue print('no')