ary = input().split(" ")
A = int(ary[0])
B = int(ary[1])

print(A + B) if B % A == 0 else print(B - A) ary = input().split(" ") ary input().split(" ") ().split () input split " " A = int(ary[0]) A int(ary[0]) int ary[0] ary 0 B = int(ary[1]) B int(ary[1]) int ary[1] ary 1 print(A + B) if B % A == 0 else print(B - A) B % A == 0 B % A B A 0 print(A + B) print A + B A B print(B - A) print B - A B A A = int(ary[0]) int(ary[0]) A ary = input().split(" ") input().split(" ") ary B = int(ary[1]) int(ary[1]) B
ary = input().split(" ")
A = int(ary[0])
B = int(ary[1])

print(A + B) if B % A == 0 else print(B - A)