semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(int argc, char *argv[])
{
  int i,j=0;
  char a[80]="",b[80]="";
  gets(a);
  gets(b);
  for(i=0;i<79;i++)
  {
     if((a[i]-b[i])!=0&&(a[i]-b[i])!=32&&(b[i]-a[i])!=32) 
     {
       j=1;
       if(a[i]<123&&a[i]>96&&b[i]<123&&b[i]>96&&a[i]>b[i])printf(">");
       if(a[i]<123&&a[i]>96&&b[i]<123&&b[i]>96&&a[i]<b[i])printf("<");
       if(a[i]<123&&a[i]>96&&b[i]<91&&b[i]>64&&a[i]>b[i]+32)printf(">");
       if(a[i]<123&&a[i]>96&&b[i]<91&&b[i]>64&&a[i]<b[i]+32)printf("<");
       if(a[i]<91&&a[i]>64&&b[i]<123&&b[i]>96&&a[i]>b[i]-32)printf(">");
       if(a[i]<91&&a[i]>64&&b[i]<123&&b[i]>96&&a[i]<b[i]-32)printf("<");
       if(a[i]<91&&a[i]>64&&b[i]<91&&b[i]>64&&a[i]>b[i])printf(">");
       if(a[i]<91&&a[i]>64&&b[i]<91&&b[i]>64&&a[i]<b[i])printf("<");
       break;
     } 
  }
  if(j==0)
  printf("=");

  return 0;
}
int main()
{
  char s1[80],s2[80],r1[80],r2[80];
  int n,i,c;
    gets(s1);gets(s2);
	int a=strlen(s1),b=strlen(s2);
	if(a>b)c=b;else c=a;
	for(i=0;i<c;i++){
		r1[i]=toupper(s1[i]);
		r2[i]=toupper(s2[i]);} 
	    r1[i]=r2[i]='\0';
     n=strcmp(r1,r2);
	  if(n==0)
	  printf("=");
	  else if(n<0)
		  printf("<");
	   else 
		  printf(">");
   return 0;
}
int main(){
	int i,l;
	char a[50],b[50];
	gets(a);gets(b);
	l=strlen(a);
	for(i=0;i<l;i++){
		if(a[i]>=97)a[i]=a[i]-32;
	}
	for(i=0;i<l;i++){
		if(b[i]>=97)b[i]=b[i]-32;
	}
	if(strcmp(a,b)>0)printf(">");
	if(strcmp(a,b)<0)printf("<");
	if(strcmp(a,b)==0) printf("=");
	return 0;
}
/*
 * ????bijiao.cpp
 * ?????
 * ????: 2011-10-30
 * ???????????????????????
 */
int main(){
	int i,k;//????
	char str1[81],str2[81];//???????
	cin.getline(str1,81);
	cin.getline(str2,81);//???????
	for(i=0;i<81;i++)
		if((str1[i]>64)&&(str1[i]<91))
			str1[i]=str1[i]+32;//????????????????
	for(i=0;i<81;i++)
			if((str2[i]>64)&&(str2[i]<91))
				str2[i]=str2[i]+32;//????????????????
	k=strcmp(str1,str2);//??????????????k
	switch(k){
	case -1:cout<<'<';break;
	case 0:cout<<'=';break;
	case 1:cout<<'>';break;//????????????
	}
	return 0;//????

}
char a[100000],b[100000];

int main()
{
	cin.getline(a,10000);
	cin.getline(b,10000);
	for(int x=0;x<min(strlen(a),strlen(b));x++)
	{
		if(a[x]<='z' && a[x]>='a')
		{
			a[x]-='a'-'A';
		
		}
		if(b[x]<='z' && b[x]>='a')
		{
			b[x]-='a'-'A';
		} 
		if(a[x]>b[x]) {cout<<">";return 0;}
		if(a[x]<b[x]) {cout<<"<";return 0;}	
	}
	if(strlen(a)==strlen(b)) {cout<<"=";return 0;}
    if(strlen(a)>strlen(b)) {cout<<">";return 0;}
	else {cout<<"<";return 0;}	
	return 0;
	
}
int main()
{
	char a[100]={0},b[100]={0};
	gets(a);
	gets(b);
	int i;
	for(i=0;a[i]!=0;i++)
	{
		if(a[i] >='a' && a[i]<='z') a[i]-=32;
		if(a[i]<32) a[i]=0;
	}
	
	for(i=0;b[i]!=0;i++)
	{
		if(b[i] >='a' && b[i]<='z') b[i]-=32;
		if(b[i]<32) b[i]=0;
	}
	
	if(strcmp(a,b)>0) printf(">");
	if(strcmp(a,b)<0) printf("<");
	if(strcmp(a,b)==0) printf("=");
	return 0;
}
main()
{   char a[100],b[100];
    int i,j,f(char x);
    gets(a);
    gets(b);
    for(i=0;a[i]!='\0'&&b[i]!='\0';i++)
    {
      if(f(a[i])==1)a[i]-=32;
      if(f(b[i])==1)b[i]-=32;
      if(a[i]<b[i]){printf("<");break;}
      if(a[i]>b[i]){printf(">");break;}
    }
    if(a[i]==b[i]&&a[i]=='\0')printf("=");


}

int f(char x)
{ return (x>=97)&&(x<=122);
}
/*
 * a003.cpp
 *
 *  Created on: 2011-10-29
 *      Author: Administrator
 */
int main()
{
	int i;
	char a1[80],b1[80];
	cin.getline(a1,80);
	cin.getline(b1,80);
	for(i=0;i<80;i++)
	{
		if(25>=a1[i]-65&&a1[i]-65>=0)
			a1[i]=a1[i]+32;
		if(25>=b1[i]-65&&b1[i]-65>=0)
			b1[i]=b1[i]+32;
	}//?????????????

	if(strcmp(a1,b1)>0) cout<<">";
	if(strcmp(a1,b1)<0) cout<<"<";
	if(strcmp(a1,b1)==0) cout<<"=";//??? ???
	return 0;
}
void main()
{
	char str1[80],str2[80];
	int len1,len2;
	gets(str1);
	gets(str2);
	len1=strlen(str1);
	len2=strlen(str2);
	void convert(char a[80],int length);
		convert(str1,len1);
	    convert(str2,len2);
	if (strcmp(str1,str2)>0)
		printf(">");
	else if (strcmp(str1,str2)<0)
		printf("<");
	else printf("=");
}

void convert(char a[80],int length)
{
	int i;
	for(i=0;i<length;i++)
	{
		if (a[i]>='A'&&a[i]<='Z')
	a[i]=a[i]+32;
	}
}
int main()
{
    char a[80]={0},b[80]={0},i;
    for(i=0,gets(a);i<80,a[i];i++)
        if(a[i]>='A'&&a[i]<='Z')a[i]+=32;
    for(i=0,gets(b);i<80,b[i];i++)
        if(b[i]>='A'&&b[i]<='Z')b[i]+=32;
    printf("%c",'='+strcmp(a,b));
    return 0;
}
int main()
{
	char str1[80],str2[80];
	int a,i,k=0;
	gets(str1);
	gets(str2);
	a=strlen(str1);
	for(i=0;i<a;i++)
	{
		if(str1[i]>='a'&&str1[i]<='z') str1[i]=str1[i]-32;
		if(str2[i]>='a'&&str2[i]<='z') str2[i]=str2[i]-32;
		if(str1[i]==str2[i]) 
		{
			k++;
			continue;
		}
		else if(str1[i]>str2[i]) printf(">\n");
		else printf("<\n");
		break;
	}
	if(k==a) printf("=\n"); 
	return 0;
}
int main()
{
 int MyStrCmp(char *pStr1,char *pStr2);
 char a1[81],a2[81];
 int t;
 gets(a1);
 gets(a2);
    t=MyStrCmp(a1,a2);
 if(t==1)printf(">");
 if(t==0)printf("=");
 if(t==-1)printf("<");
 printf("\n");
 return 0;
}

int MyStrCmp(char *pStr1,char *pStr2)
{
 int i;
 int t;
 char b1[81],b2[81];
 for(i=0;pStr1[i]!='\0';i++)
  if(pStr1[i]>='A'&&pStr1[i]<='Z')
  *(pStr1+i)=*(pStr1+i)+32;
 for(i=0;pStr2[i]!='\0';i++)
  if(pStr2[i]>='A'&&pStr2[i]<='Z')
  *(pStr2+i)=*(pStr2+i)+32;
        t=0;
  if(strlen(pStr1)>strlen(pStr2))t=1;
     if(strlen(pStr1)<strlen(pStr2))t=-1;
        if(strlen(pStr1)==strlen(pStr2))
  {
   for(i=0;i<strlen(pStr1);i++)
   {
    if(*(pStr1+i)>*(pStr2+i))
    {
     t=1;
                    break;
    }
    if(*(pStr1+i)<*(pStr2+i))
    {
     t=-1;
     break;
    }
    if(*(pStr1+i)==*(pStr2+i))
     continue;
   }
  }
 return (t);
}
//============================================================================
// Name        : test3.cpp
// Author      : Liang ShiYu
// Version     : 1.0
// Copyright   : copyright reserved
// Description : about string
//============================================================================


int main() {                       //main function
	char a[80];     
	char b[80];                    //dim string a and string b for storing the input
	cin.getline(a,80);
	cin.getline(b,80);             //get the input
	int n=strlen(a);               //calculate the length of the string
	for(int i=0;i<n;i++){
		if(a[i]>=97&&a[i]<=122) a[i]-=32;
	}
	n=strlen(b);
	for (int i=0;i<n;i++){
		if(b[i]>=97&&b[i]<=122) b[i]-=32; 
	}                                       //edit each string
	int z;
	z=strcmp(a,b);                  //compare the two string
	if (z<0) cout<<"<";
	if (z==0) cout<<"=";
	if(z>0) cout<<">";              //cout correctly
	return 0;
}
void main()
{
   char a[80],b[80];
   int i,len1,len2,t;
   gets(a);
   gets(b);
   len1=strlen(a);
   len2=strlen(b);
   for(i=0;i<len1;i++)
   {
      if(a[i]<='Z'&&a[i]>='A')a[i]=a[i]+32;
   }
   for(i=0;i<len2;i++)
   {
      if(b[i]<='Z'&&b[i]>='A')b[i]=b[i]+32;
   }
   t=strcmp(a,b);
   if(t>0)
   {
	   printf(">\n");
   }
   else
   {
	  if(t==0)printf("=\n");
	  else printf("<\n");
   }
}
int main()
{
     char str1[100],str2[100];
	 int i,j,k,n;
	 k=0;
	 gets(str1);
	 gets(str2);
	 n=strlen(str1);
	 if (strlen(str2)<n) n=strlen(str2);
     for (i=0;i<=n;i++)
	 {
	      if (k==0)
		  {
		      if (str1[i]>90) str1[i]=str1[i]-32;
              if (str2[i]>90) str2[i]=str2[i]-32;
			  if (str1[i]>str2[i]) k=1;
			  if (str1[i]<str2[i]) k=-1;
		  }
	 }
	 if (k>0) printf(">\n");
	 if (k<0) printf("<\n");
	 if (k==0) printf ("=");
}
char change(char x) 
{
	char a;
	switch (x) {
case 'a':a='A';break;
case 'b':a='B';break;
case 'c':a='C';break;
case 'd':a='D';break;
case 'e':a='E';break;
case 'f':a='F';break;
case 'g':a='G';break;
case 'h':a='H';break;
case 'i':a='I';break;
case 'j':a='J';break;
case 'k':a='K';break;
case 'l':a='L';break;
case 'm':a='M';break;
case 'n':a='N';break;
case 'o':a='O';break;
case 'p':a='P';break;
case 'q':a='Q';break;
case 'r':a='R';break;
case 's':a='S';break;
case 't':a='T';break;
case 'u':a='U';break;
case 'v':a='V';break;
case 'w':a='W';break;
case 'x':a='X';break;
case 'y':a='Y';break;
case 'z':a='Z';break;
	}
	return a;
}
int main(int argc, char* argv[])
{
	char c[80],s[80],p[80],q[80];
	gets(c);
	gets(s);
	int i;
	for(i=0;c[i]!='\0';i++) {
		if (c[i]<='z'&&c[i]>='a') {
		p[i]=change(c[i]);
		}
		else 
			p[i]=c[i];
	}
	p[i]='\0';
	for(i=0;s[i]!='\0';i++) {
		if (s[i]<='z'&&s[i]>='a') {
		q[i]=change(s[i]);
		}
		else 
			q[i]=s[i];
	}
	q[i]='\0';
	if(strcmp(p,q)==0) 
		printf("=");
	if(strcmp(p,q)<0) 
		printf("<");
	if(strcmp(p,q)>0) 
		printf(">");
	return 0;
}
int main()
{
	char a[80],b[80];
	int x,y,c,d,e;
	gets(a);
	gets(b);
	x=strlen(a);
	e=0;
	for(y=0;y<x;y++)
	{
		if(a[y]<96)
		{
			c=a[y]+32;
		}
		else
		{
			c=a[y];
		}
		if(b[y]<96)
		{
			d=b[y]+32;
		}
		else
		{
			d=b[y];
		}
		if(c==d)
		{
			continue;
		}
		else if(c>d)
		{
			e++;
			printf(">\n");
			break;
		}
		else if(c<d)
		{
			e++;
			printf("<\n");
			break;
		}
	}
	if(e==0)
	{
		printf("=\n");
	}
	return 0;
}
int main()
{
    char a[80],b[80];
    int i,c;
    gets(a);
    gets(b);
    c=strlen(a);
    for(i=0;i<=c;i++)
    {
        if(a[i]>='A'&&a[i]<='Z')
        {
            a[i]=a[i]+32;
        }
    }
        for(i=0;i<=c;i++)
    {
        if(b[i]>='A'&&b[i]<='Z')
        {
            b[i]=b[i]+32;
        }
    }
    if(strcmp(a,b)==0)
       {printf("=");}
     else if(strcmp(a,b)<0)
        {printf("<");}
     else
        {printf(">");}
return 0;
}
int main()
{
	int i,t,l1,l2;
	char str1[80],str2[80];
	cin.getline(str1,80);
	cin.getline(str2,80);
	l1=strlen(str1);
	l2=strlen(str2);
    for(i=0;i<l1;i++)
	{
		if(str1[i]<='Z') str1[i]+=32;
	}
    for(i=0;i<l2;i++)
	{
		if(str2[i]<='Z') str2[i]+=32;
	}
    t=strcmp(str1,str2);
	if(t==0) cout<<"="<<'\n';
	else if(t<0) cout<<"<"<<'\n';
	else cout<<">"<<'\n';
	return 0;
}
int main()
{
char str1[80],str2[80];
int i,m=0;
gets(str1);
gets(str2);
for(i=0;str1[i]!='\0'&&str2[i]!='\0';i++)
{
if(str1[i]>=65&&str1[i]<=90) str1[i]=str1[i]+32;
if(str2[i]>=65&&str2[i]<=90) str2[i]=str2[i]+32;
if(str1[i]>str2[i]) {printf(">\n"); m=m+1;break;}
else if(str1[i]<str2[i]) {printf("<\n");m=m+1;break;}


}
if(m==0) 
{
	if(str1[i]=='\0'&&str2[i]=='\0')
	printf("=");
    else if(str1[i]!='\0') printf(">");
	else printf("<");


}
return 0;
}
int main()
{
	int i=0;
	char a[80],b[80];
	cin.getline(a,80);
	cin.getline(b,80);
	for(;;i++)
	{
		if(a[i]>95) a[i]=a[i]-32;
		if(b[i]>95) b[i]=b[i]-32;
		if(a[i]=='\0'&& b[i]=='\0') break;
	}
	if(strcmp(a,b)==0) cout << "=";
	if(strcmp(a,b)>0) cout << ">";
	if(strcmp(a,b)<0) cout << "<";
	return 0;
}
int main(){
	char a[40];
	char b[40];
	int k,t;
	gets(a);
	gets(b);
    for(k=0;a[k]!='\0';k++){
		switch(a[k]){
		        case 'A':a[k]='a';break;
		        case 'B':a[k]='b';break;
                case 'C':a[k]='c';break;
		        case 'D':a[k]='d';break;
		        case 'E':a[k]='e';break;
		        case 'F':a[k]='f';break;
                case 'G':a[k]='g';break;
		        case 'H':a[k]='h';break;
                case 'I':a[k]='i';break;
		        case 'J':a[k]='j';break;
		        case 'K':a[k]='k';break;
		        case 'L':a[k]='l';break;
			    case 'M':a[k]='m';break;
		        case 'N':a[k]='n';break;
                case 'O':a[k]='o';break;
		        case 'P':a[k]='p';break;
		        case 'Q':a[k]='q';break;
		        case 'R':a[k]='r';break;
			    case 'S':a[k]='s';break;
		        case 'T':a[k]='t';break;
                case 'U':a[k]='u';break;
		        case 'V':a[k]='v';break;
		        case 'W':a[k]='w';break;
		        case 'X':a[k]='x';break;
 		        case 'Y':a[k]='y';break;
                case 'Z':a[k]='z';break;
		}
	}
    for(t=0;b[t]!='\0';t++){
		switch(b[t]){
                case 'A':b[t]='a';break;
				case 'B':b[t]='b';break;
                case 'C':b[t]='c';break;
		        case 'D':b[t]='d';break;
		        case 'E':b[t]='e';break;
		        case 'F':b[t]='f';break;
                case 'G':b[t]='g';break;
		        case 'H':b[t]='h';break;
                case 'I':b[t]='i';break;
		        case 'J':b[t]='j';break;
		        case 'K':b[t]='k';break;
		        case 'L':a[t]='l';break;
			    case 'M':b[t]='m';break;
		        case 'N':b[t]='n';break;
                case 'O':b[t]='o';break;
		        case 'P':b[t]='p';break;
		        case 'Q':b[t]='q';break;
		        case 'R':b[t]='r';break;
			    case 'S':b[t]='s';break;
		        case 'T':b[t]='t';break;
                case 'U':b[t]='u';break;
		        case 'V':b[t]='v';break;
		        case 'W':b[t]='w';break;
		        case 'X':b[t]='x';break;
 		        case 'Y':b[t]='y';break;
                case 'Z':b[t]='z';break;
		}
	}
	if(strcmp(a,b)<0){
		puts("<");
	}
	else if(strcmp(a,b)==0){
		puts("=");
	}
	else if(strcmp(a,b)>0){
		puts(">");
	}
	return 0;
}
int f(int x)
{
  if(x>=65&&x<=90) x=x+32;
  return(x);
}
void main()
{
  char str1[80],str2[80];
  int i;
  gets(str1);
  gets(str2);
  for(i=0;i<=79;i++)
  {
    str1[i]=f(str1[i]);
    str2[i]=f(str2[i]);
  }
  if(strcmp(str1,str2)>0) printf(">");
  else if(strcmp(str1,str2)<0) printf("<");
  else printf("=");
}
int main()
{
	char one[80],two[80];
	gets(one);
	gets(two);
	int i,a=0;
	for(i=0;one[i]!='\0';i++)
	{	if(one[i]>='A'&&one[i]<='Z') one[i]+=32;
	}	
	for(i=0;two[i]!='\0';i++)	
	{   if(two[i]>='A'&&two[i]<='Z') two[i]+=32;
     }
	if(strcmp(one,two)>0) printf(">");
	if(strcmp(one,two)==0) printf("=");
	if(strcmp(one,two)<0) printf("<");
    gets(one);
	return 0;
}
int main()
{
	char a[82]={0}, b[82]={0};
	int i;
	gets(a);
	gets(b);
	for(i=0;i<82;i++)
	{
		if(a[i]>='a'&&a[i]<='z')
		{
			a[i]=a[i]-32;
		}
		if(b[i]>='a'&&b[i]<='z')
		{
			b[i]=b[i]-32;
		}
		if(a[i]<' ')a[i]=0;
		if(b[i]<' ')b[i]=0;
	}
	for(i=0;i<82;i++)
	{
		if(a[i]<b[i])
		{
			printf("<");
			break;
		}
		if(a[i]>b[i])
		{
			printf(">");
			break;
		}
	}
	
	if(i==82)
	{
		printf("=");
	}

	
	return 0;
}
int main()
{
	char *str1,*str2,*p;
	int i;
	str1=(char *)malloc(80*sizeof(char));
	str2=(char *)malloc(80*sizeof(char));
	gets(str1);
	gets(str2);
	p=str1;
	for(i=0;*(p+i)!='\0';i++)
	{
		if(*(p+i)>='A'&&*(p+i)<='Z')
		{
			*(p+i)+=32;
		}
	}
	p=str2;
	for(i=0;*(p+i)!='\0';i++)
	{
		if(*(p+i)>='A'&&*(p+i)<='Z')
		{
			*(p+i)+=32;
		}
	}
	if(strcmp(str1,str2)<0)
		printf("<");
	else if(strcmp(str1,str2)>0)
		printf(">");
	else if(strcmp(str1,str2)==0)
		printf("=");
	return 0;
}
int main()
{
	int i=0;
	char a[255],b[255];
	gets(a);gets(b);
	for (i=0;a[i]&&b[i];i++){
		if (a[i]>='a'&&a[i]<='z')
           a[i]-='a'-'A';
		if(b[i]>='a'&&b[i]<='z')
			b[i]-='a'-'A';
			if(a[i]!=b[i]){
				if(a[i]>b[i])printf(">");
				if(a[i]<b[i])printf("<");
			break;
			}
	}
			if(!a[i]&&!b[i])
	        printf("=");
	return 0;
}
int main ()
{
	char str[100]; // ????????
	int num[100], num1[100];
	int i, r, len;
	cin.getline(str,100);
	len = strlen(str); // ??????????
	for (i = 0; i < len; i++ )
	{
		num[i] = str[i] - '0'; 
		// ?????????????????
	}
	// ?????????????????0????????
	if (len == 1)
	{
		cout << '0' << endl << num[0] << endl;
	}
	// ????????????????????
	else
	{
		num1[0] = (num[0] * 10 + num[1]) / 13;
		// ??????????
		r = (num[0] * 10 + num[1]) % 13;
		// ???????????????????????
		for (i = 2; i < len; i++ )
		{
			num1[i - 1] = (r * 10 + num[i]) / 13;
			r = (r * 10 + num[i]) % 13;
		}
		// ????????????????????????????????????error?????
		int flag = 1;
		for (i = (num1[0] == 0); i < len - 1; i++ )
		{
			cout << num1[i];
			flag = 0;
			// ??????????0?
		}
		// ??????????????0?????0?
		if (flag)
		{
			cout << '0';
		}
		cout << endl << r << endl;
	}

	return 0;
}
int posi(char*data,int k,int pos)
{
    for (int ii=0; ii<k; ii++)
    {
        if(data[pos+k-ii-1]<10){data[pos+k-ii-2]--;data[pos+k-ii-1]+=10;}
    }
    return 1;
}
int convert(char*data)
{
    int k=strlen(data);
    for (int co=0; co<k ; co++)
        data[co]=data[co]-'0'+10;
    return 0;
}
int compare(char*data1,char*data2,int pos)
{
    int j=strlen(data1),k=strlen(data2);
    if (j<k+pos) return 3;
    if(pos>=1)if(data1[pos-1]>10) return 1;
    for(int i=0;i<k;i++)
    {if(data1[i+pos]>data2[i])return 1;if(data1[i+pos]<data2[i])return 0;}
    return 1;
}
int out(char*data1,char*data2,int pos)
{
    int k=strlen(data2);
    for(int i=0;i<k;i++)
        data1[i+pos]-=data2[i]-10;
    posi(data1, k, pos);
    return 0;
}

int main()
{
    int n;
    char data1[450],data2[450]="13",r[450];
    scanf("%s",data1);
    int j,k;
    j=strlen(data1);
    k=strlen(data2);
    convert (data1);convert(data2);
    int kk;int pp=0;
    for ( kk=0; ;kk++ )
    {
        int pd=0;
        if(compare(data1, data2, kk)==3) break;
        for(;;pd++)
        {
            if(compare(data1, data2, kk)==1) out(data1,data2,kk);
            else break;
        }
        r[kk-pp]=pd+10;if(kk==0&&pd==0) pp++;
    }
    r[kk-pp]=0;
    int w=strlen(r);
    for (int rr=0 ;rr< w; rr++)
    {printf("%d",r[rr]-10);}
    if(w==0) printf("0");
    printf("\n");
    w=strlen(data1);int qq=1;
    for (int rr=0 ;rr< w; rr++)
    {if(qq)if(data1[rr]!=10){printf("%d",data1[rr]-10);qq=0;}else ;else printf("%d",data1[rr]-10);}
    if(qq) printf("0");
    if(w==0) printf("0");
    
}
int main()
{
	char a[101];
	int *p = NULL;
	int  i = 0, j = 0, yushu = 0, shang[101] = {0}, flag = 0;
	cin.getline(a,101);
	for(i = 0 ; a[i] != '\0' ; i++)
	{
		shang[j] = (yushu * 10 + (a[i] - '0')) / 13;
		yushu = (yushu * 10 + (a[i] - '0')) % 13;
		j++;
	}
	shang[j + 1] = 14;
	for(i = 0 ; shang[i] != 14; i++)
	{
		if(shang[i] != 0)
		{
			flag = 1;
			p = &shang[i];
			break;
		}
	}
	if(flag == 0)
	{
		cout << "0" << endl;
		cout << a << endl;
	}
	do
	{
		cout << *p;
		p++;
		i++;
	}while(shang[i + 1] != 14);
	cout << endl;
	cout << yushu << endl;
	return 0;
}
const int maxn=100;
int a[maxn+10];
char line[maxn+10];
int main()
{
    int i,j=0;
    scanf("%s",line);
    int len=strlen(line);
    int a[maxn+10]={0},b;
    int temp=0;
    
    for(i=0;i<len;i++)
    {
        temp=temp*10+line[i]-'0';
        a[i]=temp/13;
        temp=temp%13;
    }
    int m=0;
    if(len==1)printf("0");
    if((len<=2)&&(((line[0]-'0')*10+(line[1]-'0'))<13))printf("0");
    for(i=0;i<len;i++)
    {
        if(a[i]!=0){m=1;}
        if(m==1)printf("%d",a[i]);
        
        
    }
    printf("\n%d",temp);
    return 0;
}
int main()
{
	char aa[110];
    int a[110],b[110],c,num = 0,flag = 0;
	cin >>aa;
	for(int i = 1; i <= strlen(aa);i++)
		a[i-1] = aa[i-1]-'0';
	if(strlen(aa)==2)
	{
		if(10*a[0]+a[1]<13)
		{
			num = 1;
			b[1] = 0;
			a[1] = 10 * a[0] + a[1];
		}
	}
	if(strlen(aa) == 1)
	{
		num = 0;
		b[0] = 0;
	}
	if(strlen(aa)> 2 || (num==0&&10*a[0]+a[1] >= 13))
	{for(int j = 1; j < strlen(aa);j++)
	{
		c = 10*a[j-1]+a[j];
		if(flag == 1)
		{
			c = c+a[j-2]*100;
			flag = 0;
		}
		if(c < 13)
		{
			b[j] = 0;
			flag = 1;
		}
		if(c >= 13)
		{
			if(num == 0) num = j;
			b[j] = c/13;
			a[j] = c%13;
		}
	}
	}
	for(int k = num;k<strlen(aa);k++)
		cout << b[k];
	cout << endl;
	cout << a[strlen(aa)-1];
	return 0;
}
int main()
{
    char a[100];
    scanf("%s",a);
    int l;
    l=strlen(a);
    char m[100];
    int n,i;
    if(l==1)
    printf("0\n%d\n",a[0]-'0');
    else if(l==2&&a[0]=='1'&&a[1]<='2')
    printf("0\n%d\n",10+a[1]-'0');
    else 
    {
    for(i=0;;i++)
    {
                 if(a[i]=='\0')
                 break;
                 else a[i]=a[i]-'0';
    }
    int c;
    c=a[0];
    for(i=0;i<l-1;i++)
    {
               c=c%13*10+a[i+1];
                m[i]=c/13;
    }
    if(m[0]==0)
    {
               for(i=0;i<l-2;i++)
               m[i]=m[i+1]+'0';
               m[l-2]='\0';
    }
    else 
    {
            for(i=0;i<l-1;i++)
            {
                    m[i]=m[i]+'0';
                    m[l-1]='\0';
             }
    }
    n=c%13;
    printf("%s\n",m);
    printf("%d\n",n);
    }
    getchar();
    getchar();
}
int main()
{
	char str[110];
	int a[110];
	int i=0,j=0,k=0,len=0;
	cin.getline(str,110);
	len=strlen(str);
	if(len==1)  //??????
	{
		cout<<"0"<<endl;
		cout<<str<<endl;
	}
	else
	{
		for(i=0;str[i]!='\0';i++)
			a[i]=str[i]-'0'; //???????????????	
		k=a[0]*10+a[1];
		a[1]=k%13;  //?????????????
		if(k>13)  
		{
			cout<<k/13;
		}
		else if(len==2)
		{
			cout<<"0";
		}
		for(i=1;i<len-1;i++) //???>2?????????
		{
			k=a[i]*10+a[i+1];
			a[i+1]=k%13;
			cout<<k/13;
		}
		cout<<endl<<a[i]<<endl;
	}
	return 0;
}
int main()
{
	char c;
	int a[100]={0},b=0,m=0,i;
	while (cin>>c)
	{
		b=b*10+(int)c-48;
		a[m]=b/13;
		b=b-a[m]*13;
		m++;
	}
	for (i=0; a[i]==0; i++);
         if (i>=m) cout<<'0';
	for (; i<m; i++) cout<<a[i];
	cout<<endl;
	cout<<b<<endl;
	return 0;
}
int main ()
{
	char a[110]={0};
	char b[110]={0};
	cin.getline(a,100,'\n');
	int n;
	int p;	
	int q=a[0]-'0';
	n=strlen(a);
		for(int i=1;i<n;i++)
		{
			int m;
			p=q;
			m=p*10+(a[i]-'0');
			for(int j=0;13*j<=m;j++)
			{
				b[i-1]=(j+'0');
				q=m%13;
			}
		}
	if(b[0]=='0'&&b[1]!='\0')
	{
	for(int i=1;i<=strlen(b);i++)
	{
	b[i-1]=b[i];
	}
	}
	if(b[0]=='\0')
	{b[0]='0';}
	cout<<b<<endl;
	cout<<q;
	return 0;
}
int main()
{
    char a[100],b[99];
    int x,y,l;
    scanf ("%s",a);
    l=strlen(a);
    if (l==1)
    {printf ("0\n");
    printf ("%c",a[0]);}
    else
    {for (int i=1;i<l;i++)
    {
        a[i]=a[i]-'0';
        a[i-1]=a[i-1]-'0';
        b[i-1]=(a[i]+a[i-1]*10)/13+'0';
        a[i]=(a[i]+a[i-1]*10)%13+'0';
    }
    b[l-1]=0;
    if (b[0]=='0' && b[1]!=0)
    {
                for (int j=0;j<l;j++)
                {
                    b[j]=b[j+1];
                }
    }
    a[l-1]=a[l-1]-'0';
    printf ("%s\n",b);
    printf ("%d",a[l-1]);
    }
    getchar();
    getchar();
    getchar();
}
int main() {
	char str[105];
	cin >> str;
	int len = strlen( str ), num = 0, shang[105], j = 0, sign = 0, flag = 0;
	for ( int i = 0; str[i] != '\0'; i ++ ) {
		num += str[i] - '0';
		if ( num >= 13 ) {
			flag = 1;
			shang[j ++] = num / 13;
			if ( str[i + 1] != '\0' ) num = ( num % 13 ) * 10;
			else num = num % 13;
		}
		else if ( str[i + 1] != '\0' ) {
			num *= 10;
			shang[j ++] = 0;
		}
		else shang[j ++] = 0;
	}
	if ( flag == 0 ) cout << 0 << endl << num << endl; 
	else {
		for ( int i = 0; i < j; i ++ ) {
			if ( sign == 0 && shang[i] == 0 );
			else {
				cout << shang[i];
				sign = 1;
			}
		}
	cout << endl;
	cout << num ;
	}
	return 0;
}
main()
{
	int len;
	char a0[100];
	int a[100],b[100],c[100],d[100];
	scanf("%s",a0);
	len=strlen(a0);
	for(int t=0;t<len;t++)
	{
		a[t]=a0[t]-'0';
	}
	c[0]=a[0];
	if(len==1||(len==2&&a[0]==1&&a[1]<3))
	printf("%d",0);
	for(int i=0;i<len-1;i++)
	{
		b[i]=10*c[i]+a[i+1];
		c[i]=b[i]%13;
		d[i]=(b[i]-c[i])/13;
		c[i+1]=c[i];
		if(d[i]==0&&i==0);
		else
		printf("%d",d[i]);
	}
	printf("\n%d",c[len-1]);
}
int main ()
{
	char str[100];
	int num[100], num1[100];
	int i, r, len;
	cin.getline(str,100);
	len = strlen(str);
	for (i = 0; i < len; i++ )
	{
		num[i] = str[i] - '0';
	}
	if (len == 1)
	{
		cout << '0' << endl << num[0] << endl;
	}
	else
	{
		num1[0] = (num[0] * 10 + num[1]) / 13;
		r = (num[0] * 10 + num[1]) % 13;
		for (i = 2; i < len; i++ )
		{
			num1[i - 1] = (r * 10 + num[i]) / 13;
			r = (r * 10 + num[i]) % 13;
		}
		int flag = 0;
		for (i = (num1[0] == 0); i < len - 1; i++ )
		{
			cout << num1[i];
			flag = 1;
		}
		if (flag == 0)
		{
			cout << '0';
		}
		cout << endl << r << endl;
	}

	return 0;
}
main()
{
	char a[101],sh[101];
	int shang,ys,i,l,ws=0;
	gets(a);
	l=strlen(a);
	shang=0;
	ys=0;
	for(i=0;i<=l-1;i++)
	{
		shang=(ys*10+a[i]-'0')/13;
		if((shang==0&&ws!=0)||shang!=0)
		{
			sh[ws]=shang+'0';
			ws++;
			ys=(ys*10+a[i]-'0')%13;
		}
		else
		{
			ys=ys*10+a[i]-'0';
		}
	}
	if(ws==0)
	{
		sh[ws]='0';
		ws++;
	}
	sh[ws]='\0';
	puts(sh);
	printf("%d",ys);
	return 0;
}
int main()
{
	char n[100];
	int b[100],a[100],i,sa,c,k=0;
    scanf("%s",n);
    sa=strlen(n);
	for(i=0;i<sa;i++)
	{
		a[i]=n[i]-'0';
	}
	c=a[0];
	for (i=0;i<sa-1;i++)
	{
		b[i]=(10*c+a[i+1])/13;
		c=(10*c+a[i+1])%13;
	}
    if (sa==1)
	{
		printf("0\n%d",a[0]);
		k=1;
	}
	if ((sa==2)&&(a[0]*10+a[1]<13))
	{
		printf("0\n%d",10*a[0]+a[1]);
		k=1;
	}
	if (k==0)
	{
	if(b[0]==0) 
	{
		for(i=1;i<sa-1;i++)
		{
			printf("%d",b[i]);
		}
		printf("\n%d",c);
	}
	else 
	{
		for (i=0;i<sa-1;i++)
		{
			printf("%d",b[i]);
		}
		printf("\n%d",c);
	}}
	return 0;
}