#include <iostream>
#include<vector>
#include<cstdio>
using namespace std;
int main()
{
	vector<int>arr1;
	vector<int>arr2;
	for (int i = 2; i <= 60; i++)
	{
		int sum = 0;
		for (int temp = 1; temp < i; temp++)
		{
			if (i % temp == 0)
			{
				sum += temp;
			}
		}
		if (sum == i)
		{
			arr1.push_back(i);
		}
		else if(sum>i)
		{
			arr2.push_back(i);
		}
	}
	int last = arr1.size() - 1;
	cout << 'E' << ":" << " ";
	for (int i = 0; i < arr1.size(); i++)
	{
		cout << arr1[i] << " ";
	}
	
	cout << "G" << ":" << " "<<2<<" ";
	last = arr2.size() - 1;
	for (int i = 0; i < arr2.size(); i++)
	{
		cout << arr2[i]<<" ";
	}
	return 0;

}