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