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 = list(map(int,input().split()))
ans = 0
if not b%a:
    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(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):
from sys import stdin
A,B=[int(x) for x in stdin.readline().rstrip().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:
    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().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 = [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())

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(i) for i in 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 = [int(n) for n in input().split()]

answer = ""
if B % A == 0:
    answer = A + B
else:
    answer = B - A

print(answer)

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


main()

Solution (Python):
import sys
from operator import itemgetter


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


def main():
    input = sys.stdin.readline
    a, b = list(map(int, input().split()))

    print(r(a, b))


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):
import math
import copy
import bisect







def nCast(number):
    if type(number)==str:
        return int(number)
    for idx in range(0,len(number)):
        if type(number[idx])==str:

            number[idx]=int(number[idx])
        else:
            nCast(number[idx])
    return number
    
def inputArr(w):
    l=list()
    for idx in range(0,w):
        l.append(input())
    return l
def inputArr1(w):
    l=list()
    for idx in range(0,w):
        l.append(input().split())
    return l

n=nCast(input().split())



def func():
    if n[1]%n[0]==0:
        return sum(n)
    return n[1]-n[0]


print(func())

Solution (Python):
A,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 math
import sys
import random
from operator import itemgetter
input = sys.stdin.readline












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

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

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

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


nums = [int(num) for num in input().split()]
if nums[1] % nums[0] == 0:
    print(nums[0] + nums[1])
else:
    print(nums[1]-nums[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):
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):
import sys

sys.setrecursionlimit(200000)


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


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


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


if __name__ == "__main__":
    print(solve())

Solution (Python):
a,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(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())
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 = 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 = [int(s) for s 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 (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 = (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())
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 = 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 = 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:
    print(B - A)
else:
    print(A + B)

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

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

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

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

Solution (Python):
a, 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 = [int(v) for v 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())

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

A, B = inpl()

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

Solution (Python):
import numpy as np
import math

a, 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 collections
import math
def inpl(): return list(map(int, input().split()))


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

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

Solution (Python):
import sys

def main():
  input = sys.stdin.readline
  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 == 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):
import itertools
import numpy as np
import sys
input = sys.stdin.readline
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

A,B = IL()

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

Solution (Python):

"""
Created on Sat Feb 16 20:59:16 2019

@author: doppe
"""

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 = 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(i) for i 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)
main()

Solution (Python):
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [A, B] = [int(input_raw[0]), int(input_raw[1])]
    if B % A == 0:
        print A+B
    else:
        print B-A

if __name__ == '__main__':
    main()

Solution (Python):

def main():
    buf = input()
    buflist = buf.split()
    A = int(buflist[0])
    B = int(buflist[1])
    if B % A == 0:
        print(A+B)
    else:
        print(B-A)

if __name__ == '__main__':
    main()

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):
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())
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(str(a[0]+a[1]))
else:
    print(str(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())

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(lambda x : int(x), 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())

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

Solution (Python):




def main():
    a, b = list(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 B - A)

Solution (Python):


A, 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

A,B = [int(x) for x in stdin.readline().strip().split()]
if not B % A:
    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):
def read():
    return int(input())

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

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

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools


sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]


def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    A, B = LI()
    if B % A == 0:
        print(A+B)
    else:
        print(B-A)

main()

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] = [int(i) for i in 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):
def solve():
  A, B = map(int, input().split())
  return A + B if B % A == 0 else B - A

print(solve())

Solution (Python):
a,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 = [int(x) for x in 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)


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)


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

output = B-A

if B%A == 0:
    output = A+B

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

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

Solution (Python):



from itertools import chain
from functools import reduce
from collections import OrderedDict, Counter, deque
import operator

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())
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())
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 = 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 = [int(i) for i 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):
import sys
A,B = [int(n) for n in 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 = 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:
    print(B-A)
else:
    print(A+B)

Solution (Python):
import sys
input = sys.stdin.readline
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 = list(map(int,input().split()))

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

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions

def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())



a,b= (int(i) for i in input().split())      










if b/a == b//a:
    print(b+a)
else :print(b-a)

Solution (Python):



from collections import deque
import heapq
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())

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

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

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


import math
import numpy as np
import random
import copy
import statistics 

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
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 = [int(_) for _ 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, raw_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:
    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())
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())

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

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

Solution (Python):
def func():
    pass


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)