#include <bits/stdc++.h>
using namespace std;
inline int read(int &x) {
  scanf("%d", &x);
  return x;
}
inline long long read(long long &x) {
  scanf("%I64d", &x);
  return x;
}
inline char read(char c) {
  c = getchar();
  return c;
}
inline char *read(char *&x) {
  scanf("%s", x);
  return x;
}
inline char *readln(char *&x) {
  gets(x);
  return x;
}
inline string read(string &x) {
  cin >> x;
  return x;
}
inline string readln(string &x) {
  getline(cin, x);
  return x;
}
inline float read(float &x) {
  scanf("%f", &x);
  return x;
}
inline double read(double &x) {
  scanf("%lf", &x);
  return x;
}
inline void ToString(char *x, string &y) { y = x; }
template <typename T>
inline void read(vector<T> &a, int n) {
  a.clear();
  T x;
  for (int i = 0; i < n; i++) a.push_back(read(x));
}
template <typename T>
inline void read(T a[], int n) {
  for (int i = 0; i < n; i++) read(a[i]);
}
inline int write(int &x) {
  printf("%d", x);
  return x;
}
inline int writeln(int &x) {
  printf("%d\n", x);
  return x;
}
inline long long write(long long &x) {
  printf("%I64d", x);
  return x;
}
inline long long writeln(long long &x) {
  printf("%I64d\n", x);
  return x;
}
inline char write(char c) {
  putchar(c);
  return c;
}
inline char writeln(char c) {
  putchar(c);
  putchar('\n');
  return c;
}
inline char *write(char *&x) {
  printf("%s", x);
  return x;
}
inline char *writeln(char *&x) {
  puts(x);
  return x;
}
inline string write(string &x) {
  cout << x;
  return x;
}
inline string writeln(string &x) {
  cout << x << '\n';
  return x;
}
inline float write(float &x) {
  printf("%f", &x);
  return x;
}
inline float writeln(float &x) {
  printf("%f\n", &x);
  return x;
}
inline double write(double &x) {
  printf("%lf", &x);
  return x;
}
inline double writeln(double &x) {
  printf("%lf\n", &x);
  return x;
}
template <typename T>
inline void write(vector<T> &a, int n) {
  for (int i = 0; i < n - 1; i++) {
    write(a[i]);
    putchar(' ');
  }
  writeln(a[n - 1]);
}
template <typename T>
inline void writeln(vector<T> &a, int n) {
  for (int i = 0; i < n; i++) writeln(a[i]);
}
template <typename T>
inline void write(T a[], int n) {
  for (int i = 0; i < n - 1; i++) {
    write(a[i]);
    putchar(' ');
  }
  writeln(a[n - 1]);
}
template <typename T>
inline void writeln(T a[], int n) {
  for (int i = 0; i < n; i++) writeln(a[i]);
}
const int MAXN = 100010;
const int MAXM = 100010;
const int INF = 1e9 + 7;
int N, M;
bool exist[MAXN];
int stand[MAXN];
int primeChart[MAXM];
bool isPrime[MAXN];
int primeCnt;
int split[MAXN][70];
int splitCnt;
void MakePrimeChart(int cell) {
  primeCnt = 0;
  memset(isPrime, true, sizeof(isPrime));
  isPrime[0] = isPrime[1] = false;
  for (int i = 2; i < cell; i++) {
    if (!isPrime[i]) continue;
    primeChart[primeCnt++] = i;
    for (int j = 2; j <= cell / i; j++) isPrime[i * j] = false;
  }
}
void Split(int x) {
  int p = 0;
  int X = x;
  memset(split[X], 0, sizeof(split[X]));
  splitCnt = 0;
  while (x > 1 && p < primeCnt) {
    if (x % primeChart[p] == 0) split[X][++splitCnt] = primeChart[p];
    while (x % primeChart[p] == 0) x /= primeChart[p];
    p++;
  }
  if (x > 1) split[X][++splitCnt] = x;
  split[X][0] = splitCnt;
}
char s[2];
int x;
int main() {
  MakePrimeChart(sqrt(MAXN));
  while (~scanf("%d%d", &N, &M)) {
    for (int i = 1; i <= N; i++) Split(i);
    memset(stand, 0xff, sizeof(stand));
    memset(exist, false, sizeof(exist));
    while (M--) {
      scanf("%s%d", s, &x);
      if (s[0] == '+') {
        if (exist[x]) {
          puts("Already on");
          continue;
        }
        bool ok = true;
        int p = -1;
        for (int i = 1; i <= split[x][0]; i++)
          if (stand[split[x][i]] != -1) {
            ok = false;
            p = stand[split[x][i]];
            break;
          }
        if (!ok) {
          printf("Conflict with %d\n", p);
          continue;
        }
        for (int i = 1; i <= split[x][0]; i++) stand[split[x][i]] = x;
        exist[x] = true;
        puts("Success");
      } else {
        if (!exist[x]) {
          puts("Already off");
          continue;
        }
        for (int i = 1; i <= split[x][0]; i++) stand[split[x][i]] = -1;
        exist[x] = false;
        puts("Success");
      }
    }
  }
  return 0;
}
