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