a,b = map(int,input().split()) if b > a: a,b = b,a for i in range(30): if a >> i & 1: base = 1<