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