N, K = list(map(int, input().split()))
print(N + K) if K % N == 0 else print(K - N)  N, K = list(map(int, input().split())) N list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split K print(N + K) if K % N == 0 else print(K - N) K % N == 0 K % N K N 0 print(N + K) print N + K N K print(K - N) print K - N K N K = list(map(int, input().split())) list(map(int, input().split())) K N, K = list(map(int, input().split())) list(map(int, input().split())) N
N, K = list(map(int, input().split()))
print(N + K) if K % N == 0 else print(K - N) 