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