#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); ++i)
#define all(a) (a).begin(), (a).end()

using namespace std;
using ll = int64_t;
using P = pair<int, int>;

const ll INF_L = 1LL << 60;
const int INF_I = 1 << 30;
const int MOD = (int)1e9 + 7;
const double PI = acos(-1);
int dx[] = {1, 0, -1, 0};
int dy[] = {0, -1, 0, 1};

int main()
{
    int m, h;
    cin >> m >> h;

    cout << (h % m ? "No" : "Yes") << "\n";
    return 0;
}

//伟大的导师，伟大的领袖，伟大的统帅，伟大的舵手
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#define int long long
using namespace std;
typedef long long ll;
char __buf[1<<20],*__p1,*__p2;
//#define getchar() (__p1==__p2?(__p2=__buf+fread(__p1=__buf,1,1<<20,stdin),__p1==__p2?EOF:*__p1++):*__p1++)
int read() {
	int s=0,w=1;
	char ch=getchar();
	while(ch<'0'||ch>'9') {if(ch=='-') w=-1;ch=getchar();}
	while(ch>='0'&&ch<='9') s=(s<<3)+(s<<1)+(ch^48),ch=getchar();
	return s*w;
}
const int maxn = 1e5+10;
int n,K;
int C(int x,int y) {
	int r=1;
	for(int i=1;i<=y;i++) r=r*(x-i+1)/i;
	return r;
}
int ask(int s,int num) {
	int r=0;
	for(int i=0,ns;i<=num;i++) {
		if((ns=s-n*i)<num) continue;
		r=(r+(i&1?-1ll:1ll)*C(num,i)*C(ns-1,num-1));
	}
	return r;
}
signed main() {
	n=read(),K=read();
	for(int s=1,tt;s<=3*n;s++) {
		if((tt=ask(s,3))<K) K-=tt;
		else {
			for(int i=1;i<=n;i++) {
				if((tt=ask(s-i,2))<K) K-=tt;
				else return cout<<i<<' '<<max(1ll,s-i-n)+K-1<<' '<<s-i-(max(1ll,s-i-n)+K-1)<<'\n',0;
			}
			return 0;
		}
	}
	return 0;
}