#include using namespace std; signed main(){ int N, K; cin >> N >> K; for( int i = 2; i * i <= N; ++i ) if( N % i == 0 ) cout << N / i << endl, exit( 0 ); cout << 1 << endl; return 0; }