A, B = [int(_) for _ in input().split()]
print(B - A if B%A else A + B) int(_) for _ in input().split() for _ in input().split() _ input().split() ().split () input split for _ in input().split() int(_) int _ A, B = [int(_) for _ in input().split()] A [int(_) for _ in input().split()] B print(B - A if B%A else A + B) print B - A if B%A else A + B B%A B A B - A B A A + B A B A, B = [int(_) for _ in input().split()] [int(_) for _ in input().split()] A B = [int(_) for _ in input().split()] [int(_) for _ in input().split()] B
A, B = [int(_) for _ in input().split()]
print(B - A if B%A else A + B)