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 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()] [int(x) for x in input().split()] A
A, B = [int(x) for x in input().split()]
print(A+B if (B%A == 0) else B-A)
