t = int(input()) for _ in range(t): x,y = map(int,input().split()) dif = (1<> i & 1: ans += 1<> i & 1: ans += 1<