#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<long long, long long>;
constexpr char ln =  '\n';
constexpr long long MOD = 1000000007;
constexpr long long INF = 1000000000 + 100;
constexpr long long LINF = 1000000000000000000 + 100;
#define all(v) v.begin( ), v.end()
#define rep(i, n) for(int i=0;i<(n);i++)
#define rept(i, j, n) for(int i=(j); i<(n); i++)
#define repr(i, n) for(int i=(n); i>=0; i--)
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; }

ll tri(ll n){
    return n * (n + 1) / 2;
}

int main(){
    ll N, K; cin >> N >> K;
    for(int s=0; s<=3*(N-1); s++){
        ll cnt;
        if(s <= N-1){
            cnt = tri(s+1);
        }
        else if(s <= 2 * (N - 1)){
            cnt = N * N - tri(s - N + 1) - tri(2 * N - s - 2);
        }
        else{
            cnt = tri(3 * N - 2 - s);
        }
        if(K <= cnt){
            rep(x, N){
                ll c;
                if(s <= N - 1){
                    c = max(0, s + 1 - x);
                }
                else if(s <= 2 * (N - 1)){
                    c = N - abs(x - (s - N + 1));
                }
                else{
                    c = max(0LL, 2 * N - 1 - s + x);
                }
                if(K <= c){
                    rep(y, N){
                        if(x + y >= s - (N - 1) and x + y <= s){
                            if(K == 1){
                                cout << x+1 << " " << y+1 << " " << s-x-y+1 << ln;
                                return 0;
                            }
                            K--;
                        }
                    }
                }
                K -= c;
            }
        }
        K -= cnt;
    }
}

#include<bits/stdc++.h>
typedef long long ll;
typedef unsigned long long ull;
#define base 31
#define MOD 1e9+7
#define FOR(i, a, b) for(int i = a; i <= b; i++)
#define FORs(i, a,b) for(int i = a; i >= b; i--)
#define REP(i, a, b) for(int i = a; i < b; i++)
#define __FOR(i, a, b, k) for(int i = a; i <= b; i+= k)
#define __REP(i, a, b, k) for(int i = a; i < b; i+= k)
#define pb push_back
#define _io ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define Read_ freopen("input.inp", "r", stdin)
#define Write_ freopen("output.out", "w", stdout);
using namespace std;
typedef pair <int, int> ii;
typedef vector <ii> vii;
#define fi first
#define se second
#define mp make_pair
#define N  5005
using namespace std;
int a,b,c,d;
int main()
{
   
    cin>>a>>b;
  cin>>c>>d;
  cout<<a*d-b*c;
	return 0;
}
