stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
/// --- In the name of ALLAH --- ///





#include <cmath>

#include<bits/stdc++.h>

using namespace std;





typedef long long              ll;

typedef vector<int>            vi;

typedef vector<ll>             vl;

typedef vector<vi>             vvi;

typedef vector<vl>             vvl;

typedef pair<int,int>          pii;

typedef pair<double, double>   pdd;

typedef pair<ll, ll>           pll;

typedef vector<pii>            vii;

typedef vector<pll>            vll;

typedef double                 dl;



#define endl                   '\n'

#define PB                     push_back

#define F                      first

#define S                      second

#define all(a)                 (a).begin(),(a).end()

#define rall(a)                (a).rbegin(),(a).rend()

#define sz(x)                  (ll)x.size()

#define wt                     ll t; cin>>t; while(t--)

#define input(a,n)             for(int i=0;i<n;i++) cin>>a[i];



const double PI = acos(-1);

const double eps = 1e-9;

const int inf = 2000000000;

const ll infLL = 9000000000000000000;





#define mem(a,b) memset(a, b, sizeof(a) )

#define sqr(a) ((a) * (a))

#define mod 10000007

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);

#define file() freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);



#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

void faltu () {            cerr << endl;}

template < typename T, typename ... hello>void faltu( T arg, const hello &... rest) {cerr << arg << ' ';faltu(rest...);}



ll gcd ( ll a, ll b ) { return __gcd ( a, b ); }

ll lcm ( ll a, ll b ) { return a * ( b / gcd ( a, b ) ); }





const ll mx=1e9;



















int main()

{

    optimize();



   int n,m,i,j,p=0;

   cin>>n>>m;

   if(m%n==0)

   cout<<m+n<<endl;

   else

    cout<<m-n<<endl;









    return 0;

}
















































































// Faster C++ solution for the same problem (measured speedup: 5.335777923336718x):
#include <stdio.h>

#include <string.h>



int main(){

	int X, Y;

	scanf("%d %d", &X, &Y);

	

	(Y%X==0)?(printf("%d", X+Y)):(printf("%d", Y-X));

	return 0;

}
// Slower C++ solution:
/// --- In the name of ALLAH --- ///





#include <cmath>

#include<bits/stdc++.h>

using namespace std;





typedef long long              ll;

typedef vector<int>            vi;

typedef vector<ll>             vl;

typedef vector<vi>             vvi;

typedef vector<vl>             vvl;

typedef pair<int,int>          pii;

typedef pair<double, double>   pdd;

typedef pair<ll, ll>           pll;

typedef vector<pii>            vii;

typedef vector<pll>            vll;

typedef double                 dl;



#define endl                   '\n'

#define PB                     push_back

#define F                      first

#define S                      second

#define all(a)                 (a).begin(),(a).end()

#define rall(a)                (a).rbegin(),(a).rend()

#define sz(x)                  (ll)x.size()

#define wt                     ll t; cin>>t; while(t--)

#define input(a,n)             for(int i=0;i<n;i++) cin>>a[i];



const double PI = acos(-1);

const double eps = 1e-9;

const int inf = 2000000000;

const ll infLL = 9000000000000000000;





#define mem(a,b) memset(a, b, sizeof(a) )

#define sqr(a) ((a) * (a))

#define mod 10000007

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);

#define file() freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);



#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

void faltu () {            cerr << endl;}

template < typename T, typename ... hello>void faltu( T arg, const hello &... rest) {cerr << arg << ' ';faltu(rest...);}



ll gcd ( ll a, ll b ) { return __gcd ( a, b ); }

ll lcm ( ll a, ll b ) { return a * ( b / gcd ( a, b ) ); }





const ll mx=1e9;



















int main()

{

    optimize();



   int n,m,i,j,p=0;

   cin>>n>>m;

   if(m%n==0)

   cout<<m+n<<endl;

   else

    cout<<m-n<<endl;









    return 0;

}
















































































// Faster C++ solution for the same problem (measured speedup: 5.335777923336718x):
#include <stdio.h>



int main(){

	int a;

	int b;

	scanf("%d %d", &a, &b);

	if(b%a==0){

		printf("%d",a+b);

	}else{

		printf("%d",b-a);

	}

	return 0;

}
// Slower C++ solution:
/// --- In the name of ALLAH --- ///





#include <cmath>

#include<bits/stdc++.h>

using namespace std;





typedef long long              ll;

typedef vector<int>            vi;

typedef vector<ll>             vl;

typedef vector<vi>             vvi;

typedef vector<vl>             vvl;

typedef pair<int,int>          pii;

typedef pair<double, double>   pdd;

typedef pair<ll, ll>           pll;

typedef vector<pii>            vii;

typedef vector<pll>            vll;

typedef double                 dl;



#define endl                   '\n'

#define PB                     push_back

#define F                      first

#define S                      second

#define all(a)                 (a).begin(),(a).end()

#define rall(a)                (a).rbegin(),(a).rend()

#define sz(x)                  (ll)x.size()

#define wt                     ll t; cin>>t; while(t--)

#define input(a,n)             for(int i=0;i<n;i++) cin>>a[i];



const double PI = acos(-1);

const double eps = 1e-9;

const int inf = 2000000000;

const ll infLL = 9000000000000000000;





#define mem(a,b) memset(a, b, sizeof(a) )

#define sqr(a) ((a) * (a))

#define mod 10000007

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);

#define file() freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);



#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

void faltu () {            cerr << endl;}

template < typename T, typename ... hello>void faltu( T arg, const hello &... rest) {cerr << arg << ' ';faltu(rest...);}



ll gcd ( ll a, ll b ) { return __gcd ( a, b ); }

ll lcm ( ll a, ll b ) { return a * ( b / gcd ( a, b ) ); }





const ll mx=1e9;



















int main()

{

    optimize();



   int n,m,i,j,p=0;

   cin>>n>>m;

   if(m%n==0)

   cout<<m+n<<endl;

   else

    cout<<m-n<<endl;









    return 0;

}
















































































// Faster C++ solution for the same problem (measured speedup: 5.335777923336718x):
#include <stdio.h>

int main() {

	int a,b;

	scanf("%d %d",&a,&b);

	if ( b%a == 0 )

	{

		printf("%d",a+b);

	} 

	else 

	{

		printf("%d",b-a);	

	}

	return 0;

}
// Slower C++ solution:
/// --- In the name of ALLAH --- ///





#include <cmath>

#include<bits/stdc++.h>

using namespace std;





typedef long long              ll;

typedef vector<int>            vi;

typedef vector<ll>             vl;

typedef vector<vi>             vvi;

typedef vector<vl>             vvl;

typedef pair<int,int>          pii;

typedef pair<double, double>   pdd;

typedef pair<ll, ll>           pll;

typedef vector<pii>            vii;

typedef vector<pll>            vll;

typedef double                 dl;



#define endl                   '\n'

#define PB                     push_back

#define F                      first

#define S                      second

#define all(a)                 (a).begin(),(a).end()

#define rall(a)                (a).rbegin(),(a).rend()

#define sz(x)                  (ll)x.size()

#define wt                     ll t; cin>>t; while(t--)

#define input(a,n)             for(int i=0;i<n;i++) cin>>a[i];



const double PI = acos(-1);

const double eps = 1e-9;

const int inf = 2000000000;

const ll infLL = 9000000000000000000;





#define mem(a,b) memset(a, b, sizeof(a) )

#define sqr(a) ((a) * (a))

#define mod 10000007

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);

#define file() freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);



#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

void faltu () {            cerr << endl;}

template < typename T, typename ... hello>void faltu( T arg, const hello &... rest) {cerr << arg << ' ';faltu(rest...);}



ll gcd ( ll a, ll b ) { return __gcd ( a, b ); }

ll lcm ( ll a, ll b ) { return a * ( b / gcd ( a, b ) ); }





const ll mx=1e9;



















int main()

{

    optimize();



   int n,m,i,j,p=0;

   cin>>n>>m;

   if(m%n==0)

   cout<<m+n<<endl;

   else

    cout<<m-n<<endl;









    return 0;

}
















































































// Faster C++ solution for the same problem (measured speedup: 5.3304674205723375x):
#include <stdio.h>



int main(){

	

	int a, b;

	scanf("%d%d", &a, &b);

	if (b % a == 0){

		printf("%d\n", a + b);

	}

	else if (b % a != 0){

		printf("%d\n", b - a);

	}

	return 0;

}
// Slower C++ solution:
/// --- In the name of ALLAH --- ///





#include <cmath>

#include<bits/stdc++.h>

using namespace std;





typedef long long              ll;

typedef vector<int>            vi;

typedef vector<ll>             vl;

typedef vector<vi>             vvi;

typedef vector<vl>             vvl;

typedef pair<int,int>          pii;

typedef pair<double, double>   pdd;

typedef pair<ll, ll>           pll;

typedef vector<pii>            vii;

typedef vector<pll>            vll;

typedef double                 dl;



#define endl                   '\n'

#define PB                     push_back

#define F                      first

#define S                      second

#define all(a)                 (a).begin(),(a).end()

#define rall(a)                (a).rbegin(),(a).rend()

#define sz(x)                  (ll)x.size()

#define wt                     ll t; cin>>t; while(t--)

#define input(a,n)             for(int i=0;i<n;i++) cin>>a[i];



const double PI = acos(-1);

const double eps = 1e-9;

const int inf = 2000000000;

const ll infLL = 9000000000000000000;





#define mem(a,b) memset(a, b, sizeof(a) )

#define sqr(a) ((a) * (a))

#define mod 10000007

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);

#define file() freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);



#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

void faltu () {            cerr << endl;}

template < typename T, typename ... hello>void faltu( T arg, const hello &... rest) {cerr << arg << ' ';faltu(rest...);}



ll gcd ( ll a, ll b ) { return __gcd ( a, b ); }

ll lcm ( ll a, ll b ) { return a * ( b / gcd ( a, b ) ); }





const ll mx=1e9;



















int main()

{

    optimize();



   int n,m,i,j,p=0;

   cin>>n>>m;

   if(m%n==0)

   cout<<m+n<<endl;

   else

    cout<<m-n<<endl;









    return 0;

}
















































































// Faster C++ solution for the same problem (measured speedup: 5.335777923336718x):
#include <stdio.h>

#include <string.h>



int main(){

	int a, b;

	scanf("%d %d", &a, &b);

	if(b % a == 0){

		printf("%d", a + b);

	}else{

		printf("%d", b - a);

	}

	

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main ()

{

    int a,b;

    cin>>a>>b;

    if (b%a==0)

        cout<<a+b<<endl;

    else

        cout<<b-a<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.268166540350466x):
#include <stdio.h>

 

int main() {

 

    int a,b;

	scanf("%d %d", &a, &b) ;

	if(b % a == 0){

		printf("%d", a+b);

	}else if(b % a != 0){

		printf("%d", b-a);

	}

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



typedef long long ll;

typedef double dd;

typedef vector<int> vi;

typedef vector<ll> vl;

typedef pair<int,int> pii;



const int mx=1e6+11;

const double PI = acos(-1);

#define MOD 1000000007





#define nl '\n'

#define pb push_back

#define F first

#define S second

#define I insert

#define mp make_pair



#define sz(x) x.size()

#define tt int t; cin>>t; while(t--)

#define lo(i,a,b) for(int i=a;i<b;i++)

#define be(a) (a).begin(),(a).end()

#define rbe(a) (a).rbegin(),(a).rend()

#define mem(a,b) memset(a,b,sizeof(a))



#define su ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define file freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);

#define frac cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);



#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

void faltu () {            cerr << endl;}

template < typename T, typename ... hello>void faltu( T arg, const hello &... rest) {cerr << arg << ' ';faltu(rest...);}





int main()

{

   su;

   int a,b;

   cin>>a>>b;

   if(b%a)

    cout<<b-a<<nl;

   else

    cout<<a+b<<nl;

   return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.336212479220605x):
#include <stdio.h>

 

int main() {

 

    int a,b;

	scanf("%d %d", &a, &b) ;

	if(b % a == 0){

		printf("%d", a+b);

	}else if(b % a != 0){

		printf("%d", b-a);

	}

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main ()

{

    int a,b;

    cin>>a>>b;

    if (b%a==0)

        cout<<a+b<<endl;

    else

        cout<<b-a<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.268166540350466x):
#include<stdio.h>

 

int main(){

	int A,B;

	scanf("%d %d",&A,&B);

	if (B%A==0){

		printf("%d", A+B);

	} else {

		printf("%d", B-A);

	}

	

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



typedef long long ll;

typedef double dd;

typedef vector<int> vi;

typedef vector<ll> vl;

typedef pair<int,int> pii;



const int mx=1e6+11;

const double PI = acos(-1);

#define MOD 1000000007





#define nl '\n'

#define pb push_back

#define F first

#define S second

#define I insert

#define mp make_pair



#define sz(x) x.size()

#define tt int t; cin>>t; while(t--)

#define lo(i,a,b) for(int i=a;i<b;i++)

#define be(a) (a).begin(),(a).end()

#define rbe(a) (a).rbegin(),(a).rend()

#define mem(a,b) memset(a,b,sizeof(a))



#define su ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define file freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);

#define frac cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);



#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

void faltu () {            cerr << endl;}

template < typename T, typename ... hello>void faltu( T arg, const hello &... rest) {cerr << arg << ' ';faltu(rest...);}





int main()

{

   su;

   int a,b;

   cin>>a>>b;

   if(b%a)

    cout<<b-a<<nl;

   else

    cout<<a+b<<nl;

   return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.336212479220605x):
#include<stdio.h>

 

int main(){

	int A,B;

	scanf("%d %d",&A,&B);

	if (B%A==0){

		printf("%d", A+B);

	} else {

		printf("%d", B-A);

	}

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main ()

{

    int a,b;

    cin>>a>>b;

    if (b%a==0)

        cout<<a+b<<endl;

    else

        cout<<b-a<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.268166540350466x):
#include <stdio.h>

int main ()

{

	int A, B;

	scanf ("%d %d", &A, &B);

	if (B % A == 0){

		printf ("%d", A + B);

	} else if ( B % A != 0){

		printf ("%d", B - A);

	}

return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



typedef long long ll;

typedef double dd;

typedef vector<int> vi;

typedef vector<ll> vl;

typedef pair<int,int> pii;



const int mx=1e6+11;

const double PI = acos(-1);

#define MOD 1000000007





#define nl '\n'

#define pb push_back

#define F first

#define S second

#define I insert

#define mp make_pair



#define sz(x) x.size()

#define tt int t; cin>>t; while(t--)

#define lo(i,a,b) for(int i=a;i<b;i++)

#define be(a) (a).begin(),(a).end()

#define rbe(a) (a).rbegin(),(a).rend()

#define mem(a,b) memset(a,b,sizeof(a))



#define su ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define file freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);

#define frac cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);



#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

void faltu () {            cerr << endl;}

template < typename T, typename ... hello>void faltu( T arg, const hello &... rest) {cerr << arg << ' ';faltu(rest...);}





int main()

{

   su;

   int a,b;

   cin>>a>>b;

   if(b%a)

    cout<<b-a<<nl;

   else

    cout<<a+b<<nl;

   return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.336212479220605x):
#include <stdio.h>

int main ()

{

	int A, B;

	scanf ("%d %d", &A, &B);

	if (B % A == 0){

		printf ("%d", A + B);

	} else if ( B % A != 0){

		printf ("%d", B - A);

	}

return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main ()

{

    int a,b;

    cin>>a>>b;

    if (b%a==0)

        cout<<a+b<<endl;

    else

        cout<<b-a<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.268677159216881x):
#include <stdio.h>

int main (){

	int a;

	int b;

	scanf("%d %d",&a,&b);

	if (b % a == 0){

		printf("%d",a+b);

	}else

		printf("%d",b-a);	

	

	

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



typedef long long ll;

typedef double dd;

typedef vector<int> vi;

typedef vector<ll> vl;

typedef pair<int,int> pii;



const int mx=1e6+11;

const double PI = acos(-1);

#define MOD 1000000007





#define nl '\n'

#define pb push_back

#define F first

#define S second

#define I insert

#define mp make_pair



#define sz(x) x.size()

#define tt int t; cin>>t; while(t--)

#define lo(i,a,b) for(int i=a;i<b;i++)

#define be(a) (a).begin(),(a).end()

#define rbe(a) (a).rbegin(),(a).rend()

#define mem(a,b) memset(a,b,sizeof(a))



#define su ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define file freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);

#define frac cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);



#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

void faltu () {            cerr << endl;}

template < typename T, typename ... hello>void faltu( T arg, const hello &... rest) {cerr << arg << ' ';faltu(rest...);}





int main()

{

   su;

   int a,b;

   cin>>a>>b;

   if(b%a)

    cout<<b-a<<nl;

   else

    cout<<a+b<<nl;

   return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.336729693463211x):
#include <stdio.h>

int main (){

	int a;

	int b;

	scanf("%d %d",&a,&b);

	if (b % a == 0){

		printf("%d",a+b);

	}else

		printf("%d",b-a);	

	

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main ()

{

    int a,b;

    cin>>a>>b;

    if (b%a==0)

        cout<<a+b<<endl;

    else

        cout<<b-a<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.268166540350466x):
#include <stdio.h>



int main() {

    int aa, bb, cc, dd;

    scanf("%d %d", &aa, &bb);

    cc = aa + bb;

    dd = bb - aa;

    bb % aa == 0 ? printf("%d", cc) : printf("%d", dd);





    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



typedef long long ll;

typedef double dd;

typedef vector<int> vi;

typedef vector<ll> vl;

typedef pair<int,int> pii;



const int mx=1e6+11;

const double PI = acos(-1);

#define MOD 1000000007





#define nl '\n'

#define pb push_back

#define F first

#define S second

#define I insert

#define mp make_pair



#define sz(x) x.size()

#define tt int t; cin>>t; while(t--)

#define lo(i,a,b) for(int i=a;i<b;i++)

#define be(a) (a).begin(),(a).end()

#define rbe(a) (a).rbegin(),(a).rend()

#define mem(a,b) memset(a,b,sizeof(a))



#define su ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define file freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);

#define frac cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);



#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

void faltu () {            cerr << endl;}

template < typename T, typename ... hello>void faltu( T arg, const hello &... rest) {cerr << arg << ' ';faltu(rest...);}





int main()

{

   su;

   int a,b;

   cin>>a>>b;

   if(b%a)

    cout<<b-a<<nl;

   else

    cout<<a+b<<nl;

   return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.336212479220605x):
#include <stdio.h>



int main() {

    int aa, bb, cc, dd;

    scanf("%d %d", &aa, &bb);

    cc = aa + bb;

    dd = bb - aa;

    bb % aa == 0 ? printf("%d", cc) : printf("%d", dd);





    return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main ()

{

    int a,b;

    cin>>a>>b;

    if (b%a==0)

        cout<<a+b<<endl;

    else

        cout<<b-a<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.268166540350466x):
#include <stdio.h>



int main() {



    int a,b,c;

    scanf("%d %d", &a,&b);



    if(b % a == 0) {

        c = a + b;

        printf("%d", c);

    } else {

        c = b - a;

        printf("%d", c);

    }



    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



typedef long long ll;

typedef double dd;

typedef vector<int> vi;

typedef vector<ll> vl;

typedef pair<int,int> pii;



const int mx=1e6+11;

const double PI = acos(-1);

#define MOD 1000000007





#define nl '\n'

#define pb push_back

#define F first

#define S second

#define I insert

#define mp make_pair



#define sz(x) x.size()

#define tt int t; cin>>t; while(t--)

#define lo(i,a,b) for(int i=a;i<b;i++)

#define be(a) (a).begin(),(a).end()

#define rbe(a) (a).rbegin(),(a).rend()

#define mem(a,b) memset(a,b,sizeof(a))



#define su ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define file freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);

#define frac cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);



#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

void faltu () {            cerr << endl;}

template < typename T, typename ... hello>void faltu( T arg, const hello &... rest) {cerr << arg << ' ';faltu(rest...);}





int main()

{

   su;

   int a,b;

   cin>>a>>b;

   if(b%a)

    cout<<b-a<<nl;

   else

    cout<<a+b<<nl;

   return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.336212479220605x):
#include <stdio.h>



int main() {



    int a,b,c;

    scanf("%d %d", &a,&b);



    if(b % a == 0) {

        c = a + b;

        printf("%d", c);

    } else {

        c = b - a;

        printf("%d", c);

    }



    return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main ()

{

    int a,b;

    cin>>a>>b;

    if (b%a==0)

        cout<<a+b<<endl;

    else

        cout<<b-a<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.261793076303973x):
#include<stdio.h>

int main(){

    int a, b;

    scanf("%d %d", &a, &b);

    if(b % a == 0){

        printf("%d\n",a + b);

    }

    else{

        printf("%d\n", b - a);

    }

    return 0;

}