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):
"""


 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())


 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  


a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654


char_list = list("abcd") 
"""

import math
import sys
import itertools
import queue
from fractions import gcd

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

mod = 1000000007

if __name__ == "__main__":
    A,B = map(int, sys.stdin.readline().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):
a,b = map(int,input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Solution (Python):
ab = list(map(int, input().split(' ')))
a = ab[0]
b = 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 = 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*(2*(b%a>0)-1))

Solution (Python):
a,b=map(int,input().split());print(b+a*(2*(not b%a)-1))

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())
if y % x == 0:
  print(x+y)
else:
  print(y-x)

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):
l = [int(i) for i in input().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 B%A==0:
    print(A+B)
else:
    print(B-A)

Solution (Python):
ab = [int(i) for i in input().split()]

a = ab[0]
b = ab[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())
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):
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:
	res=b+a
else:
	res=b-a

print(res)

Solution (Python):
A, B = list(map(int, input().split()))
print(A+B if B%A==0 else 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 == 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())
C = B%A
if (C == 0):
  print(A+B)
else:
  print(B-A)

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

Solution (Python):
A,B = list(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):
def main24():
    data = input().split()
    num = []
    for i in range(2):
        num.append(int(data[i]))
    if num[1] % num[0] == 0:
        print((num[0]+num[1]))
    else:
        print((num[1]-num[0]))

if __name__ == "__main__":
    main24()

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 :
    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):
x,y=map(int,input().split())
print([y-x,x+y][y%x==0])

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

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())
print(A+B if B % A == 0 else B-A)

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

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

Solution (Python):
def main():

    """ convenient functions
    
    
    
    
    
    """

    """convenient decorator
    
    
        
        
        
        
        
        
        
        
        
        
    """
    
    
    import sys
    sys.setrecursionlimit(10**7)
    from itertools import accumulate, combinations, permutations, product 
    
    from math import factorial, ceil, floor, sqrt
    def factorize(n):
        """return the factors of the Arg and count of each factor
        
        Args:
            n (long): number to be resolved into factors
        
        Returns:
            list of tuples: factorize(220) returns [(2, 2), (5, 1), (11, 1)]
        """
        fct = []  
        b, e = 2, 0  
        while b * b <= n:
            while n % b == 0:
                n = n // b
                e = e + 1
            if e > 0:
                fct.append((b, e))
            b, e = b + 1, 0
        if n > 1:
            fct.append((n, 1))
        return fct
    def combinations_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        
        if n < 0 or r < 0:
            raise Exception('combinations_count(n, r) not defined when n or r is negative')
        if n - r < r: r = n - r
        if r < 0: return 0
        if r == 0: return 1
        if r == 1: return n
        numerator = [n - r + k + 1 for k in range(r)]
        denominator = [k + 1 for k in range(r)]
        for p in range(2,r+1):
            pivot = denominator[p - 1]
            if pivot > 1:
                offset = (n - r) % p
                for k in range(p-1,r,p):
                    numerator[k - offset] /= pivot
                    denominator[k] /= pivot
        result = 1
        for k in range(r):
            if numerator[k] > 1:
                result *= int(numerator[k])
        return result
    def combinations_with_replacement_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items allowing individual elements to be repeated more than once.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        if n < 0 or r < 0:
            raise Exception('combinations_with_replacement_count(n, r) not defined when n or r is negative')
        elif n == 0:
            return 1
        else:
            return combinations_count(n + r - 1, r)
    from bisect import bisect_left, bisect_right
    from collections import deque, Counter, defaultdict 
    from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest 
    from copy import deepcopy, copy 
    import operator
    from operator import itemgetter
    
    
    from functools import reduce, lru_cache
    def chmin(x, y):
        """change minimum
        if x > y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current minimum value
            y (long): potential minimum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x > y:
            x = y
            return (x, True)
        else:
            return (x, False)
    def chmax(x, y):
        """change maximum
        if x < y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current maximum value
            y (long): potential maximum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x < y:
            x = y
            return (x, True)
        else:
            return (x, False)

    from fractions import gcd 
    def gcds(numbers):
        return reduce(gcd, numbers)
    def lcm(x, y):
        return (x * y) // gcd(x, y)
    def lcms(numbers):
        return reduce(lcm, numbers, 1)

    
    
    INF = 10 ** 18
    MOD = 10 ** 9 + 7
    modpow = lambda a, n, p = MOD: pow(a, n, p) 
    def modinv(a, p = MOD):
        
        
        return modpow(a, p-2, p)
    def modinv_list(n, p = MOD):
        if n <= 1:
            return [0,1][:n+1]
        else:
            inv_t = [0,1]
            for i in range(2, n+1):
                inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
            return inv_t
    def modfactorial_list(n, p = MOD):
        if n == 0:
            return [1]
        else:
            l = [0] * (n+1)
            tmp = 1
            for i in range(1, n+1):
                tmp = tmp * i % p
                l[i] = tmp
            return l
    def modcomb(n, k, fac_list = [], p = MOD):
        
        
        from math import factorial
        if n < 0 or k < 0 or n < k: return 0
        if n == 0 or k == 0: return 1
        if len(fac_list) <= n:
            a = factorial(n) % p
            b = factorial(k) % p
            c = factorial(n-k) % p
        else:
            a = fac_list[n]
            b = fac_list[k]
            c = fac_list[n-k]
        return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
    def modadd(a, b, p = MOD):
        return (a + b) % MOD
    def modsub(a, b, p = MOD):
        return (a - b) % p
    def modmul(a, b, p = MOD):
        return ((a % p) * (b % p)) % p
    def moddiv(a, b, p = MOD):
        return modmul(a, modpow(b, p-2, p))

    """ initialize variables and set inputs
    
        
        
    
        
        
        
        
        
    
        
        
        
        
    
        
        
    """

    
    r = lambda: sys.stdin.readline().strip()
    r_int = lambda: int(r())
    R = lambda: list(map(int, r().split()))
    Rmap = lambda: map(int, r().split())
    Rfloat = lambda: list(map(float, r().split()))
    Rtuple = lambda: tuple(map(int, r().split()))

    """ how to treat input
    
    
    
    
    
    
    
    """

    if __name__ != '__main__':
        
        sys.stdin = open('sample.txt')

    
    

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

    """memo: how to use defaultdict of list
    
    Dic = defaultdict(list)
    
    Dic[x].append(y)
    
    for k, v in Dic.items():
    """

if __name__ == '__main__':
    main()

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

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

amari = B % A
if amari == 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())
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())
print(a+b) if b%a == 0 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):
def main():
    a, b = map(int, input().split())
    if b % a == 0:
        print(a + b)
    else:
        print(b - a)


main()

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

if b % a == 0:
    out = a + b
else:
    out = b - a

print(out)

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

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 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 = map(int,input().split())


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

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

sub = L[1] % L[0]

if sub == 0:
    print(L[0]+L[1])
else:
    print(L[1]-L[0])

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=list(map(int,input().split()))

if a[1]%a[0]==0:
	print(a[0]+a[1])
else:
	print(a[1]-a[0])

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())
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(-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=list(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())
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())
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):
x,y=map(int,input().split())
print([y-x,x+y][y % x == 0] )

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

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

if a[1]%a[0]==0:
  print(a[0]+a[1])
else:
  print(a[1]-a[0])

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())
if K % N == 0:
    print(K + N)
else:
    print(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 = 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):
x,y = map(int,input().split())	
if y%x == 0:
  print(int(y+x))
else:
  print(int(y-x))

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

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):
import sys
sys.setrecursionlimit(100000)
input=sys.stdin.readline
def intinput():return map(int,input().split())

a,b=intinput()
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 print(b - a)

Solution (Python):
a, b = list(map(int, input().split()))
print(b + a 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(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,B-A)[B%A!=0])

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

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

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

Solution (Python):
a = int()
b = int()

1 <= a <= b <=20

a,b=(int(x) for x in 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):
A,B=map(int,input().split())
if B/A==B//A:
  print(A+B)
else:
  print(B-A)

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

if n2 % n1 == 0:
    r3 = n1 + n2
else:
    r3 = n2 - n1

print(r3)

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 = 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):
B,A=list(map(int,input().split()))

which=A%B

if which==0:
    print(A+B)
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):
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(' ')))


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, raw_input().split())
if B % A == 0:
    ans = A + B
else:
    ans = B - A

print str(ans)

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

print str(ans)

Solution (Python):
A, B = (int(i) for i 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)
    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):
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 a%b==0 or b%a==0 else abs(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 abc():
    a, b = map(int, input().rstrip().split())
    if b % a == 0:
        print(a + b)
    else:
        print(b -a)


abc()

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())

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()))

ans = 0
if b % a == 0:
    ans += a + b
else:
    ans += b - a

print(ans)

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())  

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

else:
    print(B - A)

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

if __name__ == '__main__':
    main()

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 = (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=(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, 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(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):
import math
inp = input().split()
a = int(inp[0])
b = int(inp[1])

if b/a == math.floor(b/a):
    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 = list(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())
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):
input_line = input()
A,B = [int(s) for s in input_line.split(' ') if s]

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

print(answer(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())
answer = a+b if b%a==0 else b-a
print(answer)

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

if(B%A == 0 and 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())
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 = B - A
if B % A == 0:
    ans = A + B
print(ans)

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

Solution (Python):
L=list(map(int,input().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 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(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 = 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=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(v) for v in input().split() ]

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

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

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())
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())
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, p=map(int,input().split())
print(p-a if p%a else p+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):

lst_1 = input().split()

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

if B%A == 0:
    ans = A + B
else:
    ans = 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)