#include <bits/stdc++.h>


using namespace std;
#define ll long long
#define pb push_back
#define __ ios_base::sync_with_stdio(false);cin.tie(NULL);

#define bs 97
#define mx 4000007

int main() {
    __


    ll s , p ;
    cin >> s >> p ;
    ll i ;
    ll ans = 0 ;


    for (i = 1 ; i * i <= p ; i++) {
        if (p%i == 0) {
            ll x = p/i , y = i ;
            if (x + y == s) return cout << "Yes\n", 0 ;
        }
    }

    cout << "No\n" ;


    return 0 ;
}

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <utility>
#include <algorithm>
#include <cmath>
#include <climits>
#include <iomanip>
#include <queue>
#include <stack>
#include <ctype.h>

using namespace std;

typedef long long ll;

const int INF = (1<<30)-1;
const ll LINF = 1e18;

#define rep(i, n) for (int i = 0; i < n; i++)

template<class T> 
bool chmax(T &a, T b) {if (a < b) {a = b;return true;}else return false;}

template<class T> 
bool chmin(T &a, T b) {if (a > b) {a = b;return true;}else return false;}

ll mod_pow(ll a, ll n, ll p) {
    ll  ans = 1, tmp = a % p;
    while (n > 0) {
        if (n % 2)
            ans = ans * tmp % p;
        tmp = tmp * tmp % p;
        n /= 2;
    }
    return ans;
}



int main() {
    ll n, m;    cin >> n >> m;
    cout << mod_pow(10, n, m*m) / m << endl;
    return 0;
}

//小数点精度
//cout << fixed << std::setprecision(15) << y << endl;