#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const double PI = acos(-1.0);
const double EPS = 1e-8;
const int MOD = 998244353;
template <typename T>
void cmin(T &x, T y) {
  if (y < x) x = y;
}
template <typename T>
void cmax(T &x, T y) {
  if (y > x) x = y;
}
long long qpow(long long x, long long n, long long mod = MOD) {
  long long res = 1;
  while (n) {
    if (n & 1) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}
namespace Solver {
void InitOnce() {}
int n, m;
int mp[200005];
void Read() {
  int res = scanf("%d%d", &n, &m);
  if (res == -1) exit(0);
}
int cnt[200005];
int vis[200005];
void Solve() {
  memset(mp, 0, sizeof(mp));
  mp[1] = 1;
  for (int i = 2; i <= n; ++i) {
    if (mp[i] != 0) continue;
    for (int j = i; j <= n; j += i) mp[j] = i;
  }
  memset(cnt, 0, sizeof(cnt));
  memset(vis, 0, sizeof(vis));
  char s[2];
  int x;
  while (m--) {
    scanf("%s%d", s, &x);
    if (s[0] == '+') {
      if (vis[x]) {
        puts("Already on");
        continue;
      }
      vector<int> fac;
      int cx = x;
      while (x != 1) {
        fac.push_back(mp[x]);
        x /= mp[x];
      }
      x = cx;
      sort(fac.begin(), fac.end()),
          fac.erase(unique(fac.begin(), fac.end()), fac.end());
      int conflict = 0;
      for (auto i : fac) {
        if (cnt[i]) {
          conflict = cnt[i];
          break;
        }
      }
      if (conflict) {
        printf("Conflict with %d\n", conflict);
        continue;
      }
      vis[x] = 1;
      for (auto i : fac) cnt[i] = x;
      puts("Success");
      continue;
    } else {
      if (vis[x] == 0) {
        puts("Already off");
        continue;
      }
      vector<int> fac;
      int cx = x;
      while (x != 1) {
        fac.push_back(mp[x]);
        x /= mp[x];
      }
      x = cx;
      sort(fac.begin(), fac.end()),
          fac.erase(unique(fac.begin(), fac.end()), fac.end());
      vis[x] = 0;
      for (auto i : fac) cnt[i] = 0;
      puts("Success");
      continue;
    }
  }
}
}  // namespace Solver
int main() {
  Solver::InitOnce();
  while (true) {
    Solver::Read();
    Solver::Solve();
  }
  return 0;
}
