public class Main {
public static void main(String[] args) {
String s1="9999999999999999999999999999999999999999999999999",s2="11111111";
System.out.println(solution(s1, s2));
}
public static String solution(String s1,String s2) {
char[]c1=s1.toCharArray();
char[]c2=s2.toCharArray();
int[]res=new int[c1.length+c2.length];
int[]n1=new int[c1.length];
int[]n2=new int[c2.length];
for(int i=0;i<c1.length;i++) {
n1[i]=c1[i]-'0';
}
for(int i=0;i<c2.length;i++) {
n2[i]=c2[i]-'0';
}
for(int i=0;i<c1.length;i++) {
for(int j=0;j<c2.length;j++) {
res[i+j]+=n1[i]*n2[j];
}
}
for(int i=res.length-1;i>0;i--) {
res[i-1]+=res[i]/10;
res[i]=res[i]%10;
}
String str="";
for(int i=0;i<res.length-1;i++) {
str+=""+res[i];
}
return str;
}
}