#include<iostream> using namespace std; int main(){ long c; cin>>c; for(int i=2;i<10;++i){ if(c%i==0) cout<<i<<" "; } return 0; }