#include using namespace std; int N; long K; main() { cin>>N>>K; K=(long)N*(N+1)/2-K; int L=1; for(int R=1;R<=N;R++) { K-=R; while(K<0)K+=L++; if(K==0) { cout<<1<