#include <bits/stdc++.h>
using namespace std;
const int maxN = 1.1e5;
int F[maxN];
set<int> cnt[maxN];
int mark[maxN];
vector<int> getDivisors(int n) {
  vector<int> ans;
  while (n > 1) {
    int d = F[n];
    ans.push_back(d);
    while (n % d == 0) {
      n /= d;
    }
  }
  return ans;
}
int main() {
  for (int i = 0; i < maxN; i++) {
    F[i] = i;
  }
  F[0] = F[1] = 1;
  for (int i = 2; i < maxN; i++) {
    if (F[i] == i) {
      for (int j = 2 * i; j < maxN; j += i) {
        F[j] = i;
      }
    }
  }
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < maxN; i++) {
    mark[i] = 0;
  }
  while (m--) {
    string s;
    int i;
    cin >> s >> i;
    auto a = getDivisors(i);
    if (s == "+") {
      int ok = 1;
      int f;
      if (mark[i]) {
        cout << "Already on"
             << "\n";
        continue;
      }
      for (auto x : a) {
        if (cnt[x].size() > 0) {
          f = *cnt[x].begin();
          ok = 0;
        }
      }
      if (ok) {
        cout << "Success"
             << "\n";
        for (auto x : a) {
          cnt[x].insert(i);
        }
        mark[i] = 1;
      } else {
        cout << "Conflict with " << f << "\n";
      }
    }
    if (s == "-") {
      if (mark[i] == 0) {
        cout << "Already off"
             << "\n";
        continue;
      }
      cout << "Success"
           << "\n";
      for (auto x : a) {
        cnt[x].erase(i);
      }
      mark[i] = 0;
    }
  }
  return 0;
}
