#include<bits/stdc++.h>
using namespace std;
int main()
{
int ji,tu,tou,jiao;
cin>>tou>>jiao;
for(ji=1;ji<=tou;ji++)
for(tu=1;tu<=tou;tu++)
{
if (ji+tu==tou)&&(ji*2+tu*4==jiao)
cout<<ji<<tu<<endl;
}
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
int ji,tu,tou,jiao;
cin>>tou>>jiao;
for(ji=1;ji<=tou;ji++)
for(tu=1;tu<=tou;tu++)
{
if (ji+tu==tou)&&(ji*2+tu*4==jiao)
cout<<ji<<tu<<endl;
}
}