print(*[x[1] + (x[0] if x[1]%x[0]==0 else -x[0]) for x in [[int(x) for x in input().split()]]]) x[1] + (x[0] if x[1]%x[0]==0 else -x[0]) for x in [[int(x) for x in input().split()]] for x in [[int(x) for x in input().split()]] x [[int(x) for x in input().split()]] [int(x) for x in input().split()] for x in [[int(x) for x in input().split()]] x[1] + (x[0] if x[1]%x[0]==0 else -x[0]) x[1] x 1 x[0] if x[1]%x[0]==0 else -x[0] x[1]%x[0]==0 x[1]%x[0] x[1] x 1 x[0] x 0 0 x[0] x 0 -x[0] x[0] x 0 print(*[x[1] + (x[0] if x[1]%x[0]==0 else -x[0]) for x in [[int(x) for x in input().split()]]]) print *[x[1] + (x[0] if x[1]%x[0]==0 else -x[0]) for x in [[int(x) for x in input().split()]]] [x[1] + (x[0] if x[1]%x[0]==0 else -x[0]) for x in [[int(x) for x in input().split()]]]
print(*[x[1] + (x[0] if x[1]%x[0]==0 else -x[0]) for x in [[int(x) for x in input().split()]]])