#include <bits/stdc++.h>
using namespace std;

#define fastio ios_base::sync_with_stdio(0);cin.tie(0)
#define fp(i,a,b) for(int i=a ; i<b ; i++)
#define fn(i,a,b) for(int i=a ; i>=b ; i--)
#define fit(i,x) for(auto i=x.begin() ; i != x.end() ; i++)
#define pb push_back
#define ff first
#define ss second
#define all(x) x.begin(),x.end()

typedef long long ll;
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

const int M=5e5+5;
const int INF=1e9;
const int MOD=1e9+7;

ll s,p;

int main(){

	fastio;
	cin >> s >> p;
	bool b = false;

	for(ll i=1; i*i <= p; i++)
		if (p % i == 0)
			if (i + (p/i) == s) b = true;

	if (b) cout << "Yes\n";
	else cout << "No\n";

	return 0;
}
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define int ll
typedef pair<int,int> pi;
typedef vector <ll> vi;
typedef vector <pi> vpi;
typedef pair<pi, pi> pipi;
typedef set <ll> si;
//~ typedef pair<int,pii> wtf;
typedef long double ld;
#define f first
#define s second
#define FOR(i,s,e) for(ll i=s;i<=ll(e);++i)
#define DEC(i,s,e) for(ll i=s;i>=ll(e);--i)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define lbd(x, y) lower_bound(all(x), y)
#define ubd(x, y) upper_bound(all(x), y)
#define aFOR(i,x) for (auto i: x)
#define mem(x,i) memset(x,i,sizeof x)
#define fast ios_base::sync_with_stdio(false),cin.tie(0)
#define maxn 2001
#define mp make_pair
#define INF (ll)1e18

//~ #define getchar_unlocked _getchar_nolock

int TC,N,a,b;
int A,B,C;
int ans[maxn];

void solve(){
	cin >> A >> B;
	int co = 1; int co2 = 1;
	FOR(i,1,min(A,B) - 1){
		ans[co] = co2; ans[co+1] = -co2; co2++;
		co += 2;
	}
	if (B > A){
		B -= min(A,B) - 1;
		A = 1;
		int sm = 0;
		FOR(i,1,B){
			sm += co2;
			ans[co] = -co2; co2++;
			co++;
		}
		ans[co] = sm;co++;
	}else{
		A -= min(A,B) - 1;
		B = 1;
		
		int sm = 0;
		FOR(i,1,A){
			sm += co2;
			ans[co] = co2; co2++;
			co++;
		}
		ans[co] = -sm;co++;
	}
	FOR(i,1,co-1) cout << ans[i] << ' ';
	
	
	
		
}
int32_t main(){
	fast;
	
	//~ cin >> TC;
	TC = 1;
	
	while (TC--) solve();
	
	
}
