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(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())
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=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 = 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):
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())
print(a + b if b % a == 0 else 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):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
a, b = M()
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 solve():
    a, b = 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())

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==0else 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())
ans = 0
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 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())
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(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, open(0).read().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())
print(A + B if B / A == int(B / A) else B - A)

Solution (Python):






from collections import deque




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())
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):
def inp():return map(int,input().split())

a,b=inp()
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):
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())

x = b % a

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


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

Solution (Python):
import sys
A, B = map(int, sys.stdin.readline().rstrip().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:
        return A + B
    return 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))  
    print(solve(A, B))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    
    main()

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 = 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())
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())
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())
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 else a + b)

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 = [int(str) for str in input().strip().split()]
print(B - A if B % A else A + B)

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

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

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

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,b-a][b%a!=0])

Solution (Python):
def yakusu(n):
    a = []
    for i in range(1, int(n*0.5)+1):
        if n % i == 0:
            a.append(i)
    a.append(n)
    return a

A, B = map(int, input().split())
b = yakusu(B)
if A in b:
    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):
def main():
  num = list(map(int,input().split()))
  if num[1]%num[0]==0:
    print( num[0]+num[1] )
  else:
    print(num[1]-num[0])
  
main()

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] = 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())
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):
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):
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())

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

Solution (Python):
import itertools
import math
import fractions
import functools
import copy
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())
s = B%A
if s ==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 = list(map(int, input().split()))
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Solution (Python):
import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline

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

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()


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

Solution (Python):


import sys






















def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    a, b = mi()
    print(a+b) if b % a == 0 else print(b-a)


if __name__ == "__main__":
    main()

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = 10**18


a, b = Is()
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):






import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


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





A,B = inputIL()

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

Solution (Python):
A, B = map(int, input().split())
print(A + B if not B % A 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):
import sys
import math
import bisect

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):
import sys
import math
from collections import Counter
import itertools
import fractions



def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())

def LI(): return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'


p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")



A,B=MI()

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

if __name__ == '__main__':

    ABC_118_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
try:
    from typing import List
except ImportError:
    pass


def solve(A: int, B: int):
    print(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))  
    solve(A, B)


if __name__ == '__main__':
    main()

Solution (Python):
import itertools
import math

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

import sys
input = sys.stdin.readline









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([b-a,a+b][b%a<1])

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())
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=[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 = [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):
ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
ix = lambda x:list(input() for _ in range(x))
mix = lambda x:list(mi() for _ in range(x))
iix = lambda x:list(int(input()) for _ in range(x))

def main(a,b):
    return a + b if b % a == 0 else b - a

a,b = mi()
print(main(a,b))

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

Solution (Python):
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):

"""
Created on Mon May  4 20:55:48 2020
"""

import sys


sys.setrecursionlimit(10 ** 9)


mod = 10**9+7


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())
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 = 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:
    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 = [int(x) for x in input().split()]
print([a + b, b - a][int(bool(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(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 a == b:
    print(a + b)
elif 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 = 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):


def solve():

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


if __name__ == "__main__":
    solve()

Solution (Python):
x = input().split()
a = int(x[0])
b = int(x[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(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:
  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):
import sys
input = sys.stdin.readline

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 = [int(x) for x in 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=[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())

print(A + B if B % A == 0 else 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):
def aplusb(a, b):

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

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

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)