#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  map<long long, int> mp;
  vector<bool> on(n + 1);
  for (int im = 0; im < m; ++im) {
    char c;
    int i;
    cin >> c >> i;
    if (c == '+') {
      if (on[i]) {
        cout << "Already on" << endl;
        continue;
      }
      bool conflict = false;
      for (int j = 2; j * j <= i; ++j) {
        if (i % j != 0) continue;
        long long pj = j;
        pj = pj << 17;
        map<long long, int>::const_iterator it = mp.lower_bound(pj);
        if (it == mp.end()) {
        } else if ((it->first >> 17) == j) {
          cout << "Conflict with " << (it->second) << endl;
          conflict = true;
          break;
        }
        pj = i / j;
        pj = pj << 17;
        map<long long, int>::const_iterator it2 = mp.lower_bound(pj);
        if (it2 == mp.end()) {
        } else if ((it2->first >> 17) == i / j) {
          cout << "Conflict with " << (it2->second) << endl;
          conflict = true;
          break;
        }
      }
      if (conflict) continue;
      long long pj = i;
      pj = pj << 17;
      map<long long, int>::const_iterator it = mp.lower_bound(pj);
      if (it == mp.end()) {
      } else if ((it->first >> 17) == i) {
        cout << "Conflict with " << (it->second) << endl;
        continue;
      }
      cout << "Success" << endl;
      on[i] = true;
      mp[(pj | i)] = i;
      for (int j = 2; j * j <= i; ++j) {
        if (i % j == 0) {
          mp[(((long long)j) << 17) | i] = i;
          if (j * j < i) {
            mp[(((long long)i / j) << 17) | i] = i;
          }
        }
      }
    } else {
      if (on[i]) {
        cout << "Success" << endl;
        on[i] = false;
        mp.erase((((long long)i) << 17) | i);
        for (int j = 2; j * j <= i; ++j) {
          if (i % j == 0) {
            mp.erase((((long long)j) << 17) | i);
            if (j * j < i) {
              mp.erase((((long long)i / j) << 17) | i);
            }
          }
        }
      } else {
        cout << "Already off" << endl;
      }
    }
  }
  return 0;
}
