#include<stdio.h>
#include<math.h>
int main(void)
{
int gram = 0;
int res[11] = {0,};
scanf("%d",&gram);
for(int i = 10 ; i>= 0 ; i--)
{
if((gram >= (int)pow(2,i)))
{
gram -= (int)pow(2,i);
res[i] = 1;
}
}
for(int i = 0 ; i < 11 ; i++)
{
if(res[i]) printf("%d(%dg) ",i, (int)pow(2,i));
}
}