#include using namespace std; int main(){ long long s; cin >> s; int n; cin >> n; map mp; for (int i = 0; i < n; i++){ long long x; cin >> x; if (s % x == 0){ if (mp[s / x] != 0){ cout << min(x, s/x) << ' ' << max(x, s/x) << endl; } else{ mp[x] = 1; } } } }