#include <bits/stdc++.h>
using namespace std;
struct my_str {
  bool bn;
  long long num;
};
int main() {
  long long n, m;
  bool b[100003];
  my_str a[100003];
  cin >> n >> m;
  for (int i = 1; i <= sqrt(n); i++) {
    a[i].bn = false;
    a[i].num = 0;
    a[n / i].bn = false;
    a[n / i].num = 0;
  }
  for (int i = 1; i <= n; i++) {
    b[i] = false;
  }
  for (int i = 0; i < m; i++) {
    char pn;
    long long cur;
    cin >> pn >> cur;
    if (pn == '-') {
      if (b[cur]) {
        cout << "Success\n";
        b[cur] = false;
        long double t = sqrt(cur);
        for (int j = 1; j <= t; j++) {
          if (cur % j == 0) {
            a[j].bn = false;
            a[cur / j].bn = false;
            a[j].num = 0;
            a[cur / j].num = 0;
          }
        }
      } else {
        cout << "Already off\n";
      }
    } else {
      if (b[cur]) {
        cout << "Already on\n";
      } else {
        long double t = sqrt(cur);
        bool ind = false;
        long long ans = 0;
        for (int j = 1; j <= t; j++) {
          if (a[j].bn && cur % j == 0) {
            ans = a[j].num;
            ind = true;
            break;
          }
          if (a[cur / j].bn && cur % j == 0) {
            ans = a[cur / j].num;
            ind = true;
            break;
          }
        }
        if (ind) {
          cout << "Conflict with " << ans << "\n";
        } else {
          cout << "Success\n";
          b[cur] = true;
          for (int j = 1; j <= t; j++) {
            if (cur % j == 0) {
              if (j != 1) {
                a[j].bn = true;
                a[j].num = cur;
              }
              if (cur / j != 1) {
                a[cur / j].bn = true;
                a[cur / j].num = cur;
              }
            }
          }
        }
      }
    }
  }
  return 0;
}
