#include <cstdio>
#include<vector>
using namespace std;
int Sum(int i){
    int sum=0;
    for(int j=1;j<i;++j){
        if(i%j==0){
sum+=j;
        }
    }
    return sum;
}
int main() {
vector<int> E;
vector<int> G;
for(int i=2;i<61;++i){
    if(i==Sum(i)){
        E.push_back(i);
    }
    else if(i<Sum(i)){
G.push_back(i);
    }
}
printf("E:");
for(unsigned i=0;i<E.size();++i){
    printf(" %d",E[i]);
}
printf("\nG:");
for(unsigned i=0;i<G.size();++i){
    printf(" %d",G[i]);
}
printf("\n");
return 0;
    }

// 64 位输出请用 printf("%lld")