#include #include using namespace std; using namespace atcoder; #define rep(i,m,n,k) for (int i = (int)(m); i < (int)(n); i += (int)(k)) #define rrep(i,m,n,k) for (int i = (int)(m); i > (int)(n); i += (int)(k)) #define ll long long #define list(T,A,N) vector A(N);for(int i=0;i<(int)(N);i++){cin >> A[i];} const ll mod = 1000000000; using mint = static_modint<1000000000>; vector< long long > divisor(long long n) { vector< long long > ret; for(long long i = 1; i * i <= n; i++) { if(n % i == 0) { ret.push_back(i); if(i * i != n) ret.push_back(n / i); } } sort(begin(ret), end(ret)); return (ret); } int main(){ ll N,K; cin >> N >> K; vector P = divisor(N); for(auto p:P){ if (2<=p){ cout << N/p << endl; return 0; } } cout << 1 << endl; return 0; }