#include <bits/stdc++.h>
using namespace std;
const int MAX = 100001;
int last[MAX];
bool mark[MAX];
vector<int> factor(int v) {
  vector<int> ret;
  while (v > 1) {
    ret.push_back(last[v]);
    int l = last[v];
    while (v > 1 && v % l == 0) v /= l;
  }
  return ret;
}
set<int> dic[MAX];
set<int> act;
void del(int v) {
  mark[v] = false;
  act.erase(v);
  vector<int> f = factor(v);
  for (int j = 0; j < (int)f.size(); ++j) dic[f[j]].erase(v);
}
void push(int v) {
  mark[v] = true, act.insert(v);
  vector<int> f = factor(v);
  for (int j = 0; j < (int)f.size(); ++j) dic[f[j]].insert(v);
}
bool check(int v) {
  if (v > 1 && act.count(1)) {
    printf("Conflict with 1\n");
    return false;
  }
  vector<int> f = factor(v);
  bool flag = false;
  for (int j = 0; j < (int)f.size(); ++j)
    if (dic[f[j]].size() && !flag) {
      printf("Conflict with %d\n", *dic[f[j]].begin());
      return false;
    }
  return true;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 2; i < MAX; ++i)
    if (!last[i]) {
      last[i] = i;
      for (long long j = i * 1LL * i; j < MAX; j += i) last[j] = i;
    }
  char c;
  int v;
  for (int i = 0; i < m; ++i) {
    scanf(" %c %d", &c, &v);
    if (c == '+') {
      if (mark[v])
        puts("Already on");
      else {
        if (v == 1)
          puts("Success"), mark[v] = true;
        else {
          if (check(v)) puts("Success"), push(v);
        }
      }
    } else {
      if (!mark[v])
        puts("Already off");
      else
        puts("Success"), del(v);
    }
  }
  return 0;
}
