#include<iostream>
using namespace std;

int main(){

	int a[2],b[2],sum[2],i;

	for(i=0; i<3 ;i++){


		cin >> a[i]; 
		cin >> b[i];

		cout << a[i] << " " << b[i] << endl;

		sum[i] = a[i] +  b[i];



		if(sum[i] >= 0 && sum[i] < 10){//1桁の時
			cout << "1" << endl;
		}

		else if(sum[i] >= 10 && sum[i] < 100){//2桁の時
			cout << "2" << endl;
		}

		else if(sum[i] >= 100 && sum[i] < 1000){//3桁の時
			cout << "3" << endl;
		}

		else if(sum[i] >= 1000 && sum[i] < 10000){//4桁の時
			cout << "4" << endl;
		}

		else if(sum[i] >= 10000 && sum[i] < 100000){//5桁の時
			cout << "5" << endl;
		}

		else{
			cout << "想定外の範囲です。" << endl;
		}

	}

		return 0;


}