#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
int eb=1,k,sayi=600851475143;
int i=sayi;
while(i>=2){
i=i-1;
int control=0;
if (sayi%i==0){
for (k=2;k<i;k++){
if(i%k==0)
control++;
else;
}
if (control==0){
if (eb<i)
eb=i;
else
eb =eb;
}
}
}
printf ("%d",eb);
return 0;
}