n,q = map(int,input().split()) for i in range(q): s,t = map(int,input().split()) s += 1<>= 1 t >>= 1 print(ans)