#include<stdio.h>
int arr[502][502]={},visit[502]={},queue[502]={};
int total,bridge,front=0,rear=0,pk;
void pull()
{
for(int i=front;i<rear;i++)
{
queue[i-front]=queue[i];
}
rear-=front;
front=0;
}
void push(int k)
{
if(visit[k]!=0) return;
count++;
visit[k]=1;
queue[rear]=k;
rear++;
if(rear==101) pull();
}
void pop()
{
if(front==0&&rear==0) return;
pk=queue[front];
front++;
if(rear==101) pull();
}
int
int main()
{
int i,j,a,b;
scanf("%d",&total);
scanf("%d",&bridge);
for(i=0;i<bridge;i++)
{
scanf("%d %d",&a,&b);
}
return 0;
}
# x, y = input().split('-')# x=int(x)# y=int(y)# if(y//1000000==1):# print('19',x//10000,'/',(x%10000)//100,'/',x%100, sep='') # print('19%02d/%02d/%02d M'%(x//10000,(x%10000)//100,x%100))# elif(y//1000000==2):# print('19%02d/%02d/%02d F'%(x//10000,(x%10000)//100,x%100))# elif(y//1000000==3):# print('20%02d/%02d/%02d M'%(x//10000,(x%10000)//100,x%100))# elif(y//1000000==4):# print('20%02d/%02d/%02d F'%(x//10000,(x%10000)//100,x%100))x=int(input())data=[2,8]k=xbit=int(0)print('%d'%k)for i in range(len(data)): while(k>0): bit*=10 bit += k // data[i] k//=data[i] k=x print('%d %d'%(data[i], bit)) bit=0