#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 5;
int n, m;
bool activated[maxn];
map<int, int> usedby_prime;
inline void activate(int x) {
  if (activated[x]) {
    puts("Already on");
    return;
  }
  int t = x;
  for (int i = 2; i * i <= x; ++i)
    if (t % i == 0) {
      if (usedby_prime.count(i)) {
        printf("Conflict with %d\n", usedby_prime[i]);
        return;
      }
      while (t % i == 0) t /= i;
    }
  if (t > 1 && usedby_prime.count(t)) {
    printf("Conflict with %d\n", usedby_prime[t]);
    return;
  }
  t = x;
  for (int i = 2; i * i <= x; ++i)
    if (t % i == 0) {
      usedby_prime[i] = x;
      while (t % i == 0) t /= i;
    }
  if (t > 1) {
    usedby_prime[t] = x;
  }
  puts("Success");
  activated[x] = true;
}
inline void deactivate(int x) {
  if (!activated[x]) {
    puts("Already off");
    return;
  }
  int t = x;
  for (int i = 2; i * i <= x; ++i)
    if (t % i == 0) {
      usedby_prime.erase(i);
      while (t % i == 0) t /= i;
    }
  if (t > 1) usedby_prime.erase(t);
  activated[x] = false;
  puts("Success");
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i) {
    char s_op[3];
    int x;
    scanf("%s%d", s_op, &x);
    switch (s_op[0]) {
      case '+':
        activate(x);
        break;
      case '-':
        deactivate(x);
        break;
    }
  }
  return 0;
}
