a,b=map(int,input().split())

m=b/a

if m-int(m) == 0: 
 print(a+b)
else:
 print(b-a) a,b=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b m=b/a m b/a b a if m-int(m) == 0: 
 print(a+b)
else:
 print(b-a) m-int(m) == 0 m-int(m) m int(m) int m 0 print(a+b) print a+b a b print(b-a) print b-a b a m=b/a b/a m 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())

m=b/a

if m-int(m) == 0: 
 print(a+b)
else:
 print(b-a)