#include <stdio.h>

int main(){
	
	int i, s, t;//i用来遍历所有数, s用来存储数的位数,t是截取掉最高位之后的数 
	for(i=1;i<9999;i++){
		t = i;
		while(t > 0){
			s = (t/10==0?1:(t/100==0?2:(t/1000==0?3:4)));//求出这个数字位数
			t = i%(int)pow(10, s-1);//使用模除去掉最高位 
			if(t*t == i){
				printf("%d:%d\n", t, i);
			}
		}
	}
	
	
	
	return 0;
}