#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
bool flag[maxn], visit[maxn];
vector<int> v[maxn];
int match[maxn];
int n, m;
void init() {
  for (int i = 1; i < maxn; i++) v[i].clear();
  memset(flag, false, sizeof(flag));
  for (int i = 2; i < maxn; i++) {
    if (flag[i]) continue;
    for (int j = i; j < maxn; j += i) {
      flag[j] = true;
      v[j].push_back(i);
    }
  }
}
int main() {
  char s[2];
  int num;
  init();
  while (scanf("%d%d", &n, &m) != EOF) {
    memset(visit, false, sizeof(visit));
    memset(match, -1, sizeof(match));
    while (m--) {
      scanf("%s%d", s, &num);
      if (s[0] == '-') {
        if (visit[num] == false)
          puts("Already off");
        else {
          puts("Success");
          visit[num] = false;
          for (int i = 0; i < (int)v[num].size(); i++) match[v[num][i]] = -1;
        }
      } else {
        if (visit[num] == true)
          puts("Already on");
        else {
          bool ok = true;
          int i;
          for (i = 0; i < (int)v[num].size(); i++)
            if (match[v[num][i]] != -1) {
              ok = false;
              break;
            }
          if (ok) {
            puts("Success");
            visit[num] = true;
            for (int i = 0; i < (int)v[num].size(); i++) match[v[num][i]] = num;
          } else
            printf("Conflict with %d\n", match[v[num][i]]);
        }
      }
    }
  }
  return 0;
}
