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