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

#define rep(i, n) for(int i = 0, i##_len=(n); i < i##_len; ++i)
#define all(x) (x).begin(), (x).end()
#define len(x) ((int)(x).size())

void _cin() {} template <class Head, class... Tail> void _cin(Head&& head, Tail&&... tail) { cin >> head; _cin(forward<Tail>(tail)...); }
#define cin(Type, ...) Type __VA_ARGS__; _cin(__VA_ARGS__)
#define cinv(Type, xs, n) vector<Type> xs(n); rep(i, n) cin >> xs[i]
#define cinv2(Type, xs, ys, n) vector<Type> xs(n), ys(n); rep(i, n) cin >> xs[i] >> ys[i]
#define cinv3(Type, xs, ys, zs, n) vector<Type> xs(n), ys(n), zs(n); rep(i, n) cin >> xs[i] >> ys[i] >> zs[i]
#define cinvv(Type, xs, h, w) vector<vector<Type>> xs(h, vector<Type>(w)); rep(i, h) rep(j, w) cin >> xs[i][j]

void print() { cout << endl; }
template <class Head, class... Tail> void print(Head&& head, Tail&&... tail) { cout << head; if (sizeof...(tail) != 0) cout << " "; print(forward<Tail>(tail)...); }
template <class Type> void print(vector<Type> &vec) { for (auto& a : vec) { cout << a; if (&a != &vec.back()) cout << " "; } cout << endl; }
template <class Type> void print(vector<vector<Type>> &df) { for (auto& vec : df) { print(vec); } }

void YESNO(bool b) { cout << (b ? "YES" : "NO") << endl; }
void YesNo(bool b) { cout << (b ? "Yes" : "No") << endl; }
void yesno(bool b) { cout << (b ? "yes" : "no") << endl; }
template<class Integer>bool chmax(Integer &a, const Integer &b) { if (a < b) { a = b; return 1; } return 0; }
template<class Integer>bool chmin(Integer &a, const Integer &b) { if (b < a) { a = b; return 1; } return 0; }

using ll = long long;

void Main() {
	cin(int, n,w);
	print(n/w);
}

signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(16);

	Main();
}
#include <bits/stdc++.h>
using namespace std;

#define rep(i,a,b) for(int i = a; i < (b);++i)
#define all(x) begin(x), end(x)
#define sz(x) (int) (x).size()

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int MAX_N = 1000001;
int n;
ll k;

int main(){
    cin.tie(0)->sync_with_stdio(false);
    cin.exceptions(cin.failbit);
    cin>>n>>k;
    int i = 3;
    ll cur = 1;
    ll sum = 1;
    while(sum < k){
        int ans1,ans2;
        if(i<n+2){
            ans1 = 0;
        }else if(i>= n+2 && i<= 2*n+1){
            ans1 = i-(n+1);
        }else{
            ans1 = 3*n-i+1;
        }
        if(i>2*n){
            ans2 = 0;
        }else if(i>= n+1 && i<= 2*n){
            ans2 = 2*n-i+1;
        }else{
            ans2 = i-1;
        }
        cur = cur - ans1 + ans2;
        sum +=cur;
        i++;
    }
    ll k2 = k - (sum - cur); 
    int t = i;
    i = 1;
    sum = 0;
    while(sum<k2){
        if(t-i > 2*n){
            cur = 0;
        }else if(t-i <= 2*n && t-i>= n+1){
            cur = 2*n -(t-i) +1;
        }else{
            cur = t - i -1;
        }
        sum+=cur;
        i++;
    }
    i--;
    int k3 = k2 - (sum - cur);
    int j;
    if((t-i) >= n+1){
        j = k3 + (t-i-n)-1;
    }else{
        j = k3;
    }
    cout << i <<" "<< j <<" "<<t-(i+j)<<endl;
    return 0;
}

