x,y=map(int,input().split())
print([y-x,x+y][y%x==0]) x,y=map(int,input().split()) x map(int,input().split()) map int input().split() ().split () input split y print([y-x,x+y][y%x==0]) print [y-x,x+y][y%x==0] [y-x,x+y] y-x y x x+y x y y%x==0 y%x y x 0 y=map(int,input().split()) map(int,input().split()) y x,y=map(int,input().split()) map(int,input().split()) x
x,y=map(int,input().split())
print([y-x,x+y][y%x==0])