#include <iostream>

using namespace std;
int main(){
	int n,m,sum,count;
	for(int i=1;cin.eof()==false;i++){
		cin >> n >> m;
		sum = n + m;
		cout << sum << endl;
		count = 0;
		while(sum!=0){
			sum /= 10;
			count++;
		}
		cout << count << endl;
	}
}