#include <bits/stdc++.h>
using namespace std;
bool a[200000], was[200000];
vector<int> d[100010];
int x, v, n, m, z, r;
char s;
int check(int x) {
  for (int i = 2; i <= int(sqrt(x + 0.0)); i++) {
    if (x % i == 0) {
      while (x % i == 0) x /= i;
      for (int j = 0; j < d[i].size(); j++)
        if (a[d[i][j]] == true) return d[i][j];
    }
  }
  if (x > 1) {
    for (int j = 0; j < d[x].size(); j++)
      if (a[d[x][j]] == true) return d[x][j];
  }
  return -1;
}
void add(int x) {
  r = x;
  for (int i = 2; i <= int(sqrt(x + 0.0)); i++) {
    if (x % i == 0) {
      while (x % i == 0) x /= i;
      d[i].push_back(r);
    }
  }
  if (x > 1) {
    d[x].push_back(r);
  }
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    scanf("%s %d", &s, &x);
    if (s == '-') {
      if (a[x] == true) {
        printf("Success\n");
        a[x] = false;
      } else
        printf("Already off\n");
    } else {
      if (a[x] == true)
        printf("Already on\n");
      else {
        z = -1;
        z = check(x);
        if (z == -1) {
          printf("Success\n");
          a[x] = true;
          if (was[x] == false) add(x);
          was[x] = true;
        } else
          printf("Conflict with %d\n", z);
      }
    }
  }
  return 0;
}
