

a, b = [int(x) for x in input().split()]
print(a + b if b % a == 0 else b - a) int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x a, b = [int(x) for x in input().split()] a [int(x) for x in input().split()] b print(a + b if b % a == 0 else b - a) print a + b if b % a == 0 else b - a b % a == 0 b % a b a 0 a + b a b b - a b a a, b = [int(x) for x in input().split()] [int(x) for x in input().split()] a b = [int(x) for x in input().split()] [int(x) for x in input().split()] b


a, b = [int(x) for x in input().split()]
print(a + b if b % a == 0 else b - a)
