#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long int ll;

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for(auto it = d.b;it != d.e;++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  ll s, p;cin >> s >> p;
  bool ans = false;
  for(ll i = 1;i * i <= p;i++){
    if(p % i == 0){
      ll fst = i;
      ll snd = p / i;
      if(fst + snd == s)ans = true;
    }
  }
  if(ans)cout << "Yes";
  else cout << "No";
  cout << endl;
}

#define rep(i, n) for(int i=0; i<(n); ++i)
#define rrep(i, n) for(int i=(n-1); i>=0; --i)
#define rep2(i, s, n) for(int i=s; i<(n); ++i)
#define ALL(v) (v).begin(), (v).end()
#define memr(dp, val) memset(dp, val, sizeof(dp))
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T> inline T int_ceil(T a, T b) { T res = a / b; if(a % b != 0) res++; return res; }
#include <bits/stdc++.h>
using namespace std;
template<typename T>
using min_priority_queue = priority_queue<T, vector<T>, greater<T> >;
typedef long long ll;
static const int INTINF = (INT_MAX >> 1); // 10^9 + 10^7
static const ll LLINF = (LLONG_MAX >> 1);
// sort(ALL(v), [](auto const& lhs, auto const& rhs) { return lhs > rhs; /* 左の方が大きい...というイメージ。*/ });
// --------------------------------------------------------------------------------------------- //

static const int MAX = 100001;
static const ll MOD = 1000000007;

ll dividedNum(ll n){
	ll ret = 0;
	ll lim = sqrt(n)+1;
    for(ll i=1; i<lim; i++){
        if(n%i==0){
            ret++;
            if(i != n / i && lim <= n/i){
                ret++;
            }
        }
	}
	ll res = ret / 2 * 2;
	res += ret % 2;
    return res;
}

ll dp[MAX];
ll N, K;
ll dividedNum2(ll n){
	if(n == 2) return 1;
	ll ret = 0;
	ll ng_num = max(0LL, n - N - 1LL);
	ll tmp = (n-1)/2 - ng_num;
	ret += tmp * 2;
	ret = max(0LL, ret);
	if(n % 2 == 0 && n / 2 <= N){
		ret++;
	}

	return max(0LL, ret);
}

int main(int argc, const char * argv[]) {
	std::cout << std::fixed << std::setprecision(15);

	cin >> N >> K;

	if(K < 0) K *= -1;
	memset(dp, 0, sizeof(dp));


	// 足したら2 * Nになるやつを求める

	ll ans = 0;
	// A決定
	for(int i=2; i<=2 * N; i++){
		//  Kから，B決定
		ll A = i;
		ll B = A - K;
		if(!(2 <= B && B <= 2 * N)){
			continue;
		}
		// cout << A << " " << B << endl;
		// A, Bの作り方の個数を調べる
		ll a_num = dividedNum2(A);
		ll b_num = dividedNum2(B);
		// cout << a_num << " " << b_num << endl;
		// それの掛け算をansにプラス
		ans += a_num * b_num;
	}
	cout << ans << endl;

	return 0;
}
