public static void main(String[] args) {
		long number = 600851475143L;
		for(int i = 2; i < Math.sqrt(number); i++)
		{
			if((number / i) * i == number)
				number = number / i;
		}
		System.out.println(number);
	}