#include <iostream>

using namespace std;



int main()
{
	int pointsToWin, totalPoints;
	cin >> pointsToWin >> totalPoints;

	if (totalPoints >= pointsToWin * 3)
	{
		if (totalPoints >= pointsToWin * 5)  // 5 sets
		{
			int team1Points[5], team2Points[5];
			for (int i = 0; i < 5; i++)
			{
				if (i == 2 || i == 3)
				{
					team2Points[i] = pointsToWin;
					team1Points[i] = 0;
				}
				else
				{
					team1Points[i] = pointsToWin;
					team2Points[i] = 0;
				}
			}

			if (pointsToWin * 5 < totalPoints)
			{

				if ((totalPoints - pointsToWin * 5) / 5 + (totalPoints - pointsToWin * 5) % 5 < pointsToWin - 2)
				{

					for (int i = 0; i < 5; i++)
					{

						if (i == 2 || i == 3)
							team1Points[i] = (totalPoints - pointsToWin * 5) / 5;

						else
							team2Points[i] = (totalPoints - pointsToWin * 5) / 5;

						if (i == 1)
							team2Points[i] += (totalPoints - pointsToWin * 5) % 5;
					}
				}

				else
				{
					for (int i = 0; i < 5; i++)
					{
						if (i == 2 || i == 3)
							team1Points[i] = pointsToWin - 2;

						else
							team2Points[i] = pointsToWin - 2;
					}
						if (totalPoints > (pointsToWin * 2 - 2) * 5)
						{

							if ((totalPoints - (pointsToWin + pointsToWin - 2) * 5) % 2 == 0)
							{
								team1Points[1] += (totalPoints - (pointsToWin * 2 - 2) * 5) / 2;
								team2Points[1] += (totalPoints - (pointsToWin * 2 - 2) * 5) / 2;
							}

							else
							{
								team2Points[1] -= 1;
								team1Points[0] += (totalPoints - (pointsToWin * 2 - 2) * 5 + 1) / 2;
								team2Points[0] += (totalPoints - (pointsToWin * 2 - 2) * 5 + 1) / 2;
							}
						}
				}
			}
			for (int i = 0; i < 5; i++)
				cout << team1Points[i] << " : " << team2Points[i] << endl;
		}
		else if (totalPoints >= pointsToWin * 4)  // 4 sets
		{
			int team1Points[4], team2Points[4];
			for (int i = 0; i < 4; i++)
			{
				if (i == 2)
				{
					team2Points[i] = pointsToWin;
					team1Points[i] = 0;
				}
				else
				{
				team1Points[i] = pointsToWin;
				team2Points[i] = 0;
				}
			}

			if (pointsToWin * 4 < totalPoints)
			{
				for (int i = 0; i < 4; i++)
				{
					if (i == 2)
						team1Points[i] = (totalPoints - pointsToWin * 4) / 4;
					else
					    team2Points[i] = (totalPoints - pointsToWin * 4) / 4;
					if (i == 1)
						team2Points[i] += (totalPoints - pointsToWin * 4) % 4;
				}
			}
			for (int i = 0; i < 4; i++)
				cout << team1Points[i] << " : " << team2Points[i] << endl;
		}

		else  // 3 sets
		{
			int team1Points[3], team2Points[3];
			for (int i = 0; i < 3; i++)
				{
					team1Points[i] = pointsToWin;
					team2Points[i] = 0;
				}
			if (pointsToWin * 3 < totalPoints)
			{
				for (int i = 0; i < 3; i++)
				{
					team2Points[i] = (totalPoints - pointsToWin * 3) / 3;
					if (i == 2)
						team2Points[i] += (totalPoints - pointsToWin * 3) % 3;
				}
			}
			for (int i = 0; i < 3; i++)
				cout << team1Points[i] << " : " << team2Points[i] << endl;
		}
	}
	else  // impossible match
		cout << "-1";
}