Problem:
 Score : 100 points    Problem Statement You are given positive integers A and B .  If A is a divisor of B , print A + B ; otherwise, print B - A .      Constraints  All values in input are integers.  1 \leq A \leq B \leq 20         Input Input is given from Standard Input in the following format:  A  B       Output If A is a divisor of B , print A + B ; otherwise, print B - A .        Sample Input 1 4 12      Sample Output 1 16  As 4 is a divisor of 12 , 4 + 12 = 16 should be printed.       Sample Input 2 8 20      Sample Output 2 12       Sample Input 3 1 1      Sample Output 3 2  1 is a divisor of 1 .

Solution (Python):
a, b = map(int, input().split())

if (b%a == 0) :
    print(int(a+b))
else :
    print(int(b-a))

Solution (Python):
import math
def f():
    a , b = map(int, input().split())
    print(a+b if b%a==0 else b-a)
f()

Solution (Python):
a, b = map(int, input().split())
if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
def sub():
    A, B = [int(e) for e in input().split()]
    q, m = divmod(B, A)
    if q > 0 and m == 0:
        print(A+B)
    else:
        print(B-A)

sub()

Solution (Python):
a,b = input().split()

A = int(a)
B = int(b)

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

Solution (Python):
a,b=map(int, input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
a, b = map(int , input().split())
print(a + b if b % a == 0 else b - a)

Solution (Python):
A, B = map(int, input().split())
print([B-A, A+B][B % A == 0])

Solution (Python):
a,b = map(int,input().split())
if b%a:
    print(b-a)
else:
    print(a+b)

Solution (Python):
A, B = map(int, input().split())

if B % A:
    print(B - A)
else:
    print(A + B)

Solution (Python):

A,B = map(int, input().split())

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

Solution (Python):
a,b = map(int,input().split(" "))
if (b%a == 0):
  print(a+b)
else :
  print(b-a)

Solution (Python):
A, B = map(int, input().split())
if B%A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
def main():
    a, b = map(int, input().split())

    if b % a == 0:
        print(a + b)
    else:
        print(b - a)

if __name__ == "__main__":
    main()

Solution (Python):
a,b = map(int,input().split())
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
A, B = map(int, input().split())
if B%A == 0: print(A+B)
else: print(B-A)

Solution (Python):
a,b=map(int,input().split())
if b%a== 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B = [int(ab) for ab in input().split()]
if B % A == 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):

import sys


def solve(A: int, B: int):
    if B % A == 0:
        print(A+B)
    else:
        print(B-A)



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

Solution (Python):
a,b=map(int, input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b=map(int,input().split())

if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b



def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)



def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def main():
    A, B = map(int, input().split())
    if B % A == 0:
        print(A + B)
    else:
        print(B - A)


if __name__ == '__main__':
    main()

Solution (Python):
a, b = input().split()
a, b = int(a), int(b)

if b%a==0:
  print(a+b)
  
else:
  print(b-a)

Solution (Python):
a,b=map(int,input().split())
     
if b%a==0:
  print(int(b+a))
else:
  print(int(b-a))

Solution (Python):
a,b = map(int, input().split())
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
*l, = map(int, open(0).read().split())
if l[1] % l[0] == 0:
	print(l[0] + l[1])
else:
	print(l[1] - l[0])

Solution (Python):
A, B = map(int, input().split())

if not B % A:
    print(B + A)
else:
    print(B - A)

Solution (Python):
a,b = map(int,input().split())

if b % a == 0 :
    print("{}".format(a + b))
else : print("{}".format(b - a))

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
A, B = [int(s) for s in input().split()]
print(A + B if B % A == 0 else B - A)

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B = map(int, input().split())
if B%A==0:
	print(A+B)
else:
	print(B-A)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
  print(A + B)
else:
  print(B - A)

Solution (Python):
A,B =map(int, input().split())
if B % A == 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
from sys import stdin
sp = stdin.readline().split()
A, B = int(sp[0]), int(sp[1])

def div(num):
    l = []
    for itr in range(1,num+1):
        if num % itr == 0:
            l.append(itr)
    return l

B_divisor = div(B)
if A in B_divisor:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A,B = map(int, input().split())
if B % A == 0:
    print(A + B)
else:
    print(B - A)

Solution (Python):
a, b = map(int, input().split())

calc = b % a

if calc == 0:
    output = a + b
else :
    output = b - a

print(output)

Solution (Python):
a,b = map(int,input().split())
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A, B = list(map(int, input().split()))

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

Solution (Python):
first = input()
(sA, sB, ) = first.split()
A = int(sA)
B = int(sB)
if B%A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b = map(int, input().split())

print(a+b if b%a == 0 else b-a)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0 : print(a+b)
else : print(b-a)

Solution (Python):
import sys


def input():
    return sys.stdin.readline()[:-1]








a,b=map(int,input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B = [int(i) for i in input().split()]
print(B+A) if B % A == 0 else print(B-A)

Solution (Python):
A, B = map(int, input().split())
if B%A:
  print(B - A)
else:
  print(A+B)

Solution (Python):
A,B=map(int,input().split())
if B % A ==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b = map(int,input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b = map(int, input().split())
if b % a == 0:
    print(str(a+b))
else:
    print(str(b-a))

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a, b = map(int, input().split(" "))
print( b + a if b%a==0 else b - a )

Solution (Python):
A,B=map(int,input().split())
mod=B%A
if mod==0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
a,b = [int(i) for i in input().split()]
if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a,b = map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a,b=map(int,input().split())
print(b-a if b%a else a+b)

Solution (Python):
import sys
input = sys.stdin.readline

N, M = map(int, input().split())

if M % N == 0:
    print(N + M)
else:
    print(M - N)

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
A, B = map(int,input().split())

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

Solution (Python):

import sys


def solve(A: int, B: int):
    if(B%A == 0):
        print(A+B)
    else:
        print(B-A)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

Solution (Python):
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

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

Solution (Python):
a, b = map(int, input().split())
if b // a == b / a:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())
if b%a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0: print(A + B)
else: print(B - A)

Solution (Python):
a, b = map(int, input().split())
print(a+b if b % a ==0 else b - a)

Solution (Python):
A,B = map(int,input().split())
if B%A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
A, B = list(map(int, input().split()))

if B % A == 0:
    print(str(A+B))

else:
    print(str(B-A))

Solution (Python):
A,B = map(int,input().split())
if B%A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b = map(int,input().split())
print(a+b if b%a == 0 else b-a)

Solution (Python):
a,b = map(int,input().split())

if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A,B = map(int,input().split())
if B % A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b = map(int,input().split())
if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b = map(int, input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A,B = map(int,input().split())
if B % A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b = map(int,input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
if __name__ == '__main__':
    A, B = map(int, input().split())

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

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a,b = (int(j) for j in input().split())
if b%a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
	print(a+b)
else:
	print(b-a)

Solution (Python):
a,b=map(int,input().split())
print(b+a) if b%a == 0 else print(b-a)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
a,b = map(int,input().split())

if b%a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
    print(A + B)
else:
    print(B - A)

Solution (Python):
A,B=map(int,input().split())

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

Solution (Python):


def main():
    a, b = map(int, input().split())
    if b % a == 0:
        print(a+b)
    else:
        print(b-a)

if __name__ == "__main__":
    main()

Solution (Python):
a, b = map(int,input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(b + a)
else:
	print(b - a)

Solution (Python):
a,b = map(int,(input().split()))
if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B= list(map(int, input().split()))

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

Solution (Python):
a, b = map(int,input().split())
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A,B = list(map(int,input().split()))
if B%A == 0:
    print(A + B)
else:
    print(B - A)

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
    print(B+A)
else:
    print(B-A)

Solution (Python):
A, B = [int(a) for a in input().split(" ")]
print(A+B if B%A==0 else B-A)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b = map(int,input().split())

ans = b-a
if b%a == 0:
    ans = a+b
print(ans)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):

a, b = map(int, input().split())
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
a, b = [int(i) for i in input().split()]
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):


a, b = map(int, input().split())
print(a+b) if b % a ==0 else print(b-a)

Solution (Python):
A,B = map(int,input().split())
if B % A == 0:
    print(A + B)
else:
    print(B - A)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
A, B = list(map(int, input().split()))

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

Solution (Python):
a, b = map(int, input().split())

if (b % a == 0):
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
    print(A + B)
else:
    print(B - A)

Solution (Python):
a,b = map(int,input().split())
if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B = (int(x) for x in input().split())
print(A+B if B%A==0 else B-A)

Solution (Python):
A, B = map(int,input().split())
if B % A == 0:
	print(A+B)
else:
	print(B-A)

Solution (Python):
AB=input().split()
if int(AB[1])%int(AB[0])==0:
    print(int(AB[0])+int(AB[1]))
else:
    print(int(AB[1])-int(AB[0]))

Solution (Python):
a,b = map(int,input().split())
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())

if b%a == 0:
    print(b+a)
else:
    print(b-a)

Solution (Python):
A,B = map(int,input().split())

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

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):


def solve():
    A, B = list(map(int, input().split()))
    
    if B%A == 0:
        print(A+B)
    else:
        print(B-A)

if __name__ == "__main__":
    solve()

Solution (Python):
a, b = map(int, input().split())
print(a + b if b % a == 0 else b  -a)

Solution (Python):
A, B = map(int, raw_input().split())

if B%A == 0:
    print '{}'.format(A+B)
else: 
    print '{}'.format(B-A)

Solution (Python):
A, B = map(int, input().split())
if B%A == 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
a,b=map(int,input().split())

m=b/a

if m-int(m) == 0: 
 print(a+b)
else:
 print(b-a)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
A,B = map(int, input().strip().split(' '))
if B % A == 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):

import sys
from math import *
from itertools import *
from collections import *
from functools import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(A: int, B: int):
    return (A + B) if B % A == 0 else (B - A)


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    result = solve(A, B)
    print(result)

if __name__ == '__main__':
    main()

Solution (Python):
a, b = map(int, input().split())
if (b % a) == 0:
    ans = a + b
else:
    ans = b - a
print(ans)

Solution (Python):
A, B = map(int, input().split())
print(A + B) if B % A == 0 else print(B - A)

Solution (Python):
a,b = map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
A, B = map(int,input().split())
if B % A == 0:
  print(A + B)
else:
  print(B - A)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
	print(A + B)
else:
	print(B - A)

Solution (Python):
a,b = map(int,input().split())
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
a,b = map(int,input().split())
print(a+b if b%a == 0 else b-a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
    print(A + B)
else:
    print(B - A)

Solution (Python):
x, y = map(int, input().split())

print([y-x, x+y][y % x == 0])

Solution (Python):
A, B = map(int, input().split())
if B%A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
A,B = map(int,input().split())
print(A+B if B%A ==0 else B-A)

Solution (Python):



N = input().split()
N_map = map(int,N)

N_list = [x for x in N_map]
a = N_list[0]
b = N_list[1]

if b % a == 0:
    print(b+a)

else:
    print(b-a)

Solution (Python):
ab = input().split()
a = int(ab[0])
b = int(ab[1])

if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
A,B = map(int , input().split())

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

Solution (Python):
A, B = list(map(int, input().split()))
print(A+B if B%A==0 else B-A)

Solution (Python):
a,b = map(int,input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A,B = map(int, input().split())
print(A+B if B%A==0 else B-A)

Solution (Python):
A, B = map(int, input().split())
if (B%A == 0):
    C = A + B
else:
    C = B - A
print(C)

Solution (Python):
[A,B] = list(map(int,input().split()))
if B % A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
a, b = map(int, input().split())
print(a+b if b%a == 0 else b-a)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
a, b = [int(c) for c in input().split()]

if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
A, B = map(int, input().split())
print(A + B if B % A == 0 else B - A)

Solution (Python):
A,B = map(int, input().split())
if B % A ==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
A,B = map(int, input().split())
b = []
for i in range(1,21):
    if B % i == 0:
        b.append(i)
if A in b:
    print(A+B)
else:
    print(B-A)

Solution (Python):
x,y=map(int,input().split())
if y%x ==0:
  print(x+y)
else:
  print(y-x)

Solution (Python):
A, B = map(int, input().split())

if B % A:
    print(B - A)
else:
    print(A + B)

Solution (Python):
A, B = map(int, input().split())
if not B % A:
    print(A + B)
else:
    print(B - A)

Solution (Python):
AB_list=input().split()
A=int(AB_list[0])
B=int(AB_list[1])
if B%A==0:
    ans=A+B
else:
    ans=B-A
print(ans)

Solution (Python):

from sys import stdin
A,B = map(int,stdin.readline().rstrip().split())
print( A + B if B % A == 0 else B - A)

Solution (Python):
a,b = map(int, input().split())
if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a == 0 else b-a)

Solution (Python):
A,B = map(int,input().split())
if B % A == 0:
    print(A + B)
else:
    print(B - A)

Solution (Python):
a, b = map(int, input().split())
large = max(a, b)
small = min(a, b)
if (large % small) == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
A,B=input().split()
a=int(A)
b=int(B)
if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A,B= map(int,input().split())
print(A+B if B%A==0 else B-A)

Solution (Python):
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper

a, b = inl()

if b % a == 0:
    print(a + b)
else:
    print(b-a)

Solution (Python):
input = input().split()
A = int(input[0])
B = int(input[1])

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

Solution (Python):


A, B = map(int, input().split())
print(A + B if B % A == 0 else B - A)

Solution (Python):

A,B= map(int,input().split())
print(A+B if B%A==0 else B-A)

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

Solution (Python):
a,b = map(int, (input().split()))

if b%a ==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b = list(map(int,input().split()))

if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
a,b=map(int, input().split())

if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b = map(int,input().split())
print(a+b) if b %a ==0 else print(b -a)

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
	print(a + b)
else:
	print(b - a)

Solution (Python):

a, b = list(map(int, input().split()))

print(a + b if b % a == 0 else b - a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A,B = map(int,input().split())

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

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
    print(A+B)
else:
    print(B - A)

Solution (Python):
a=[int(i) for i in input().split()]
print(a[0]+a[1] if a[1]%a[0]==0 else a[1]-a[0])

Solution (Python):
A,B = map(int,input().split())

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

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)

Solution (Python):
A,B = map(int, input().split())
print(A+B) if B%A == 0 else print(B-A)

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(int(a + b))
else:
    print(int(b - a))

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):


A, B = list(map(int, input().split()))

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

Solution (Python):
a, b = [int(i) for i in input().split()]
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
a, b = map(int, input().split())
if((b % a) == 0):
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
a,b = map(int,input().split())
if b%a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B = map(int, input().split())
for i in range(B+1):
    if i == 0:
        continue
    if B % (A*i) == 0:
        print(A + B)
        exit()
print(B - A)

Solution (Python):
a,b = map(int, input().split())
print(a + b if b % a == 0 else b - a)

Solution (Python):
A,B=map(int,input().split())
if B%A == 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
a,b=map(int,input().split())
if(b%a==0):
    print(a+b)

else:
    print(b-a)

Solution (Python):
A, B = map(int,input().split())
if(B%A == 0):
  print(A+B)
else:
  print(B-A)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
a,b = map(int,input().split())
if (b%a) == 0 :
    print(a+b)
else :
    print(b-a)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int,input().split())
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b=map(int, input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
i = list(map(int, input().split()))
if (i[1]%i[0])==0:
	print(i[0]+i[1])
else:
	print(i[1]-i[0])

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Solution (Python):
A, B = map(int, input().rstrip().split())

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

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
A ,B = map(int,input().split())
if B%A == 0:
  print(B+A)
else:
  print(B-A)

Solution (Python):
a, b = map(int, input().split())
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
a, b = map(int, input().split())
print(a+b if b%a == 0 else b-a)

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a, b = map(int, input().split())
if b % a:
    print(b - a)
else:
    print(a + b)

Solution (Python):
A, B = map(int, input().split())
print([A + B, B - A][not(B % A == 0)])

Solution (Python):
A, B = [int(s) for s in input().split(' ')]
print(A + B if B % A == 0 else B - A)

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
A, B = map(int, input().split())
print(A + B if B % A == 0 else B - A)

Solution (Python):
A, B = list(map(int, input().split()))
print((B-A) if B%A else (A+B))

Solution (Python):
a, b = map(int, raw_input().split())
if (b%a) == 0:
  print a + b
else:
  print b - a

Solution (Python):
a,b=map(int, input().split())
c=b%a
if c==0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a,b=map(int,input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A,B = map(int, input().split())
if B%A == 0:
  print(A+B)
else:
  print(B-A)

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
	print(A + B)
else:
	print(B - A)

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
A,B=(int(x) for x in input().split())
if(B % A == 0):
  print(A + B)
else:
  print(B - A)

Solution (Python):
A, B = map(int,input().split())

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

Solution (Python):
a,b=map(int, input().split())
print(a+b if b%a == 0 else b-a)

Solution (Python):
A, B = map(int, raw_input().split())
if B%A == 0: print A+B
else: print B-A

Solution (Python):
def solve(a, b):
    if b % a == 0:
        return b + a
    else:
        return b - a


def main():
    a, b = map(int, input().split())

    ans = solve(a, b)
    print(ans)


main()

Solution (Python):
A,B=map(int,input().split())
print(A+B if B%A==0 else B-A)

Solution (Python):


def main():
    A, B = [int(x) for x in input().split()]
    if divisor(A, B) == True:
        print(A + B)
    else:
        print(B - A)

def divisor(A, B):
    if B % A == 0: return True 
    return False


if __name__ == "__main__":
    main()

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
a, b = map(int, input().split())

print(a + b if b % a == 0 else b - a)

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
a, b = map(int, input().split())
print(b - a if b % a else a + b)

Solution (Python):
a, b = map(int, input().split())

if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
A,B=map(int,input().split())
if B%A==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
A,B = map(int,input().split())
mod = B % A
if mod == 0:
    print(A + B)
else:
    print(B - A)

Solution (Python):
a,b = map(int,input().split())

print(a+b if b%a == 0 else b-a)

Solution (Python):
A,B = [int(i) for i in input().split()]
if (B % A == 0) :
    print(A+B)
else :
    print(B-A)

Solution (Python):
l=input().split()
a=int(l[0])
b=int(l[1])
if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
l =input().split()

A = int(l[0])
B = int(l[1])

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

Solution (Python):
A,B = map(int,input().split())
if B%A == 0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b=map(int,input().split())
if(b%a==0):
  print(a+b)
else:
  print(b-a)

Solution (Python):
a, b = map(int, input().split())
ans = a + b if b % a == 0 else b - a
print(ans)

Solution (Python):
a,b = map(int,input().split())

if (b%a == 0):
    print(a+b)
else:
    print(b-a)

Solution (Python):
A,B = map(int,input().split())
if B % A == 0:
  print(A + B)
else:
  print(B - A)

Solution (Python):
a,b = map(int,input().split())

if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
ab = input().split()
a,b = int(ab[0]),int(ab[1])

if b%a==0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
a,b = map(int,input().split())

if b % a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
a,b = [int(i) for i in input().split()]

if b%a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A, B =map(int, input().split())
if B%A==0:
  print(B+A)
else:
  print(B-A)

Solution (Python):
a,b = map(int,input().split())
print(a+b if b%a == 0 else b-a)

Solution (Python):
A,B = map(int, input().split())
if B % A == 0:
    print(A+B)
else :
    print(B-A)

Solution (Python):
A, B = map(int,input().split())
if B % A ==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
a,b = map(int, input().split())
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Solution (Python):
A,B = map(int,input().split())

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

Solution (Python):
A, B = map(int, input().split())
if B % A == 0:
  print(A + B)
else:
  print(B - A)

Solution (Python):
A, B =map(int,input().split())
if B%A == 0:
    print(A+B)
else:
    print(B-A)