Language: C++

#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

const int SIZ = 100000;
int sieve[SIZ];

vector<int> getPrimes() {
    vector<int> primes;
    fill_n(sieve, SIZ, true);
    sieve[0] = sieve[1] = false;
    for (int i=2; i<SIZ; ++i) {
        if ( ! sieve[i]) continue;
        primes.push_back(i);
        if (i*i <= SIZ) {
            for (int j=i*2; j<SIZ; j+=i) {
                sieve[j] = false;
            }
        }
    }
    return primes;
}

int main() {
    ios::sync_with_stdio(false);
    vector<int> p = getPrimes();
    int m, a, b;
    while (1) {
        cin >> m >> a >> b;
        if (!m && !a && !b) break;
        int p = 0, q = 0, max_m = 0;
        for (int i=0; i<(int)p.size(); ++i) {
            for (int j=i; j<(int)p.size(); ++j) {
                p[j] = p[j];
                if (p[i] * p[j] < 0 || m < p[i] * p[j] || b * p[i] < a * p[j]) {
                    break;
                }
                if (max_m < p[i] * p[j]) {
                    p = p[i];
                    q = p[j];
                    max_m = p[i] * p[j];
                }
            }
        }
        cout << p << " " << q << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:32: error: request for member 'size' in 'p', which is of non-class type 'int'
   34 |         for (int i=0; i<(int)p.size(); ++i) {
      |                                ^~~~
a.cc:35:36: error: request for member 'size' in 'p', which is of non-class type 'int'
   35 |             for (int j=i; j<(int)p.size(); ++j) {
      |                                    ^~~~
a.cc:36:18: error: invalid types 'int[int]' for array subscript
   36 |                 p[j] = p[j];
      |                  ^
a.cc:36:25: error: invalid types 'int[int]' for array subscript
   36 |                 p[j] = p[j];
      |                         ^
a.cc:37:22: error: invalid types 'int[int]' for array subscript
   37 |                 if (p[i] * p[j] < 0 || m < p[i] * p[j] || b * p[i] < a * p[j]) {
      |                      ^
a.cc:37:29: error: invalid types 'int[int]' for array subscript
   37 |                 if (p[i] * p[j] < 0 || m < p[i] * p[j] || b * p[i] < a * p[j]) {
      |                             ^
a.cc:37:45: error: invalid types 'int[int]' for array subscript
   37 |                 if (p[i] * p[j] < 0 || m < p[i] * p[j] || b * p[i] < a * p[j]) {
      |                                             ^
a.cc:37:52: error: invalid types 'int[int]' for array subscript
   37 |                 if (p[i] * p[j] < 0 || m < p[i] * p[j] || b * p[i] < a * p[j]) {
      |                                                    ^
a.cc:37:64: error: invalid types 'int[int]' for array subscript
   37 |                 if (p[i] * p[j] < 0 || m < p[i] * p[j] || b * p[i] < a * p[j]) {
      |                                                                ^
a.cc:37:75: error: invalid types 'int[int]' for array subscript
   37 |                 if (p[i] * p[j] < 0 || m < p[i] * p[j] || b * p[i] < a * p[j]) {
      |                                                                           ^
a.cc:40:30: error: invalid types 'int[int]' for array subscript
   40 |                 if (max_m < p[i] * p[j]) {
      |                              ^
a.cc:40:37: error: invalid types 'int[int]' for array subscript
   40 |                 if (max_m < p[i] * p[j]) {
      |                                     ^
a.cc:41:26: error: invalid types 'int[int]' for array subscript
   41 |                     p = p[i];
      |                          ^
a.cc:42:26: error: invalid types 'int[int]' for array subscript
   42 |                     q = p[j];
      |                          ^
a.cc:43:30: error: invalid types 'int[int]' for array subscript
   43 |                     max_m = p[i] * p[j];
      |                              ^
a.cc:43:37: error: invalid types 'int[int]' for array subscript
   43 |                     max_m = p[i] * p[j];
      |                                     ^