#include <bits/stdc++.h>
using namespace std;
template <typename T>
void deb(initializer_list<T> l) {
  for (auto &e : l) cout << e << ' ';
  cout << '\n';
}
vector<int> freq(1e5 + 2, 0);
vector<set<int>> adj(1e5 + 2);
void changeFreq(int n, int del) {
  int on = n;
  for (int i = 2; i * i <= on; ++i) {
    if (n % i != 0) continue;
    if (del == 1)
      adj[i].insert(on);
    else
      adj[i].erase(on);
    while (n % i == 0) {
      n /= i;
      freq[i] += del;
    }
  }
  if (n > 1) {
    if (del == 1)
      adj[n].insert(on);
    else
      adj[n].erase(on);
    freq[n] += del;
  }
}
int collides(int n) {
  int on = n;
  for (int i = 2; i * i <= on; ++i) {
    if (n % i != 0) continue;
    if (freq[i]) return *adj[i].begin();
    while (n % i == 0) n /= i;
  }
  if (n > 1)
    if (freq[n]) return *adj[n].begin();
  return -1;
}
void solve() {
  int n, m;
  cin >> n >> m;
  vector<bool> a(n + 1, false);
  while (m--) {
    char type;
    int i;
    cin >> type >> i;
    if (type == '-') {
      if (!a[i])
        cout << "Already off\n";
      else {
        a[i] = false;
        cout << "Success\n";
        changeFreq(i, -1);
      }
      continue;
    }
    if (a[i]) {
      cout << "Already on\n";
      continue;
    }
    int idx = collides(i);
    if (idx != -1)
      cout << "Conflict with " << idx << '\n';
    else {
      cout << "Success\n";
      a[i] = true;
      changeFreq(i, 1);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int t = 1;
  while (t--) solve();
  return 0;
}
