#include <bits/stdc++.h>
using namespace std;
template <class T>
T MAX(T a, T b) {
  return a > b ? a : b;
}
template <class T>
T MIN(T a, T b) {
  return a < b ? a : b;
}
template <class T1>
void __(T1 p) {
  cout << p << endl;
}
template <class T1>
void deb(T1 p) {
  cout << "Debugging: " << p << endl;
}
template <class T1, class T2>
void deb(T1 p, T2 q) {
  cout << "Debugging: " << p << "\t" << q << endl;
}
template <class T1, class T2, class T3>
void deb(T1 p, T2 q, T3 r) {
  cout << "Debugging: " << p << "\t " << q << "\t " << r << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 p, T2 q, T3 r, T4 s) {
  cout << "Debugging: " << p << "\t " << q << "\t " << r << "\t " << s << endl;
}
long long int POOW(long long b, long long p) {
  if (p == 0) return 1;
  return b * POOW(b, p - 1);
}
bool CHK(int mask, int pos) { return (1 & (mask >> pos)); }
const int first[] = {0, 0, 1, -1, -1, 1, -1, 1};
const int second[] = {1, -1, 0, 0, 1, 1, -1, -1};
const int kx[] = {-2, -1, 1, 2, 2, 1, -1, -2};
const int ky[] = {1, 2, 2, 1, -1, -2, -2, -1};
int prime[100005], ison[100005], safe[100005], sob[10000], tot = 0;
set<int> ss[100005];
void SEIEVE() {
  long long unsigned i, j, lim = sqrt(100001 + 100);
  for (i = 2; i <= lim; i++) {
    if (prime[i] == 0) {
      for (j = i * i; j < 100005; j += i) {
        prime[j] = 1;
      }
    }
  }
  return;
}
int OKAY(int val) {
  int i, j;
  for (i = 0; i < tot; i++) {
    if (val % sob[i] == 0) {
      if (safe[sob[i]]) return sob[i];
      while (val % sob[i] == 0) val /= sob[i];
    }
  }
  if (val != 1) {
    if (safe[val]) return val;
  }
  return 0;
}
void UPDATE(int val) {
  int i, j, a = val;
  for (i = 0; i < tot; i++) {
    if (val % sob[i] == 0) {
      safe[sob[i]]++;
      ss[sob[i]].insert(a);
      while (val % sob[i] == 0) val /= sob[i];
    }
  }
  if (val != 1) {
    safe[val]++;
    ss[val].insert(a);
  }
}
void NEG_UPDATE(int val) {
  int i, j, a = val;
  ;
  for (i = 0; i < tot; i++) {
    if (val % sob[i] == 0) {
      if (safe[sob[i]]) safe[sob[i]]--;
      ss[sob[i]].erase(a);
      while (val % sob[i] == 0) val /= sob[i];
    }
  }
  if (val != 1) {
    if (safe[val]) safe[val]--;
    ss[val].erase(a);
  }
}
int main() {
  int i, t, j, k, l, keis(0), c, d, x, y, a, b, n, m;
  char sign;
  set<int> my;
  SEIEVE();
  prime[1] = 1;
  for (i = 1; i < sqrt(100001 + 100); i++) {
    if (prime[i] == 0) sob[tot++] = i;
  }
  scanf("%d", &n);
  scanf("%d", &m);
  memset(ison, 0x00, sizeof ison);
  memset(safe, 0x00, sizeof safe);
  while (m--) {
    scanf(" %c %d", &sign, &a);
    if (sign == '+') {
      if (ison[a]) {
        puts("Already on");
        continue;
      }
      b = OKAY(a);
      if (b == 0) {
        ison[a] = 1;
        my.insert(a);
        UPDATE(a);
        puts("Success");
      } else {
        printf("Conflict with ");
        for (auto uu : ss[b]) {
          printf("%d\n", uu);
          break;
        }
      }
    } else {
      if (!ison[a]) {
        puts("Already off");
        continue;
      }
      NEG_UPDATE(a);
      ison[a] = 0;
      my.erase(a);
      puts("Success");
    }
  }
  return 0;
}
