a,b = map(int, input().split()) print('Yes' if ~b & a == 0 else 'No')