#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:36777216")
using namespace std;
const int inf = 1 << 30;
const long long Inf = 1LL << 62;
const int dx[] = {-1, 0, 1, 0, -1, -1, 1, 1, 0};
const int dy[] = {0, 1, 0, -1, -1, 1, 1, -1, 0};
const double eps = 1e-9;
const double pi = 3.1415926535897932384626433832795;
template <class T>
inline bool eq(const T &a, const T &b) {
  return fabs(a - b) < eps;
}
template <class T>
inline bool deg2(const T &n) {
  return (n & (n - 1)) == 0;
}
template <class T>
inline void chmax(T &a, const T &b) {
  a = max(a, b);
}
inline int intRand(int l, int r) {
  return ((rand() << 16) | rand()) % (r - l + 1) + l;
}
inline long long llRand(long long l, long long r) {
  return (((1ll * rand()) << 48) | ((1ll * rand()) << 32) | (rand() << 16) |
          rand()) %
             (r - l + 1) +
         l;
}
bool is[100500], dd;
int s[1000], a[100500], n, m, i, ii, cnt, j, pr[100000], pp;
char q;
bool prime(int n) {
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  srand(time(NULL));
  for (i = 2; i < 100000; i++)
    if (prime(i)) pr[pp++] = i;
  scanf("%d%d\n", &n, &m);
  while (m--) {
    scanf("%c%d\n", &q, &i);
    if (q == '+') {
      if (is[i]) {
        puts("Already on");
        continue;
      }
      ii = i;
      cnt = 0;
      for (j = 0; 1ll * pr[j] * pr[j] <= 1ll * i; j++) {
        dd = 0;
        while (i % pr[j] == 0) {
          i /= pr[j];
          dd = 1;
        }
        if (dd) s[cnt++] = pr[j];
      }
      if (i > 1) s[cnt++] = i;
      dd = 0;
      for (j = 0; j < cnt; j++)
        if (a[s[j]]) {
          printf("Conflict with %d\n", a[s[j]]);
          dd = 1;
          break;
        }
      if (dd) continue;
      puts("Success");
      for (j = 0; j < cnt; j++) a[s[j]] = ii;
      is[ii] = 1;
    } else {
      if (!is[i]) {
        printf("Already off\n");
        continue;
      }
      is[i] = 0;
      for (j = 0; 1ll * pr[j] * pr[j] <= 1ll * i; j++) {
        dd = 0;
        while (i % pr[j] == 0) {
          i /= pr[j];
          a[pr[j]] = 0;
        }
      }
      if (i > 1) a[i] = 0;
      puts("Success");
    }
  }
  return 0;
}
