#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<vector<int> > primeFactors;
bool isComposite[100001];
bool isOn[100001];
int divv[100001];
void seive() {
  for (long long i = 2; i <= n; i++) {
    if (isComposite[i]) continue;
    primeFactors[i].push_back(i);
    for (long long j = i * 2; j <= n; j += i) {
      isComposite[j] = true;
      primeFactors[j].push_back(i);
    }
  }
}
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
void clearDiv(int x) {
  for (int i = 0; i < primeFactors[x].size(); i++) divv[primeFactors[x][i]] = 0;
}
void setDiv(int x) {
  for (int i = 0; i < primeFactors[x].size(); i++) divv[primeFactors[x][i]] = x;
}
int check(int x) {
  for (int i = 0; i < primeFactors[x].size(); i++) {
    if (divv[primeFactors[x][i]]) return divv[primeFactors[x][i]];
  }
  return x;
}
int main() {
  scanf("%d %d", &n, &m);
  scanf("%*c");
  primeFactors.resize(n + 1);
  seive();
  for (int i = 0; i < m; i++) {
    char s;
    int x;
    scanf("%c %d", &s, &x);
    scanf("%*c");
    if (s == '-') {
      if (isOn[x]) {
        printf("Success\n");
        isOn[x] = false;
        clearDiv(x);
      } else
        printf("Already off\n");
    } else {
      if (isOn[x])
        printf("Already on\n");
      else {
        int temp = check(x);
        if (temp == x) {
          printf("Success\n");
          isOn[x] = true;
          setDiv(x);
        } else {
          printf("Conflict with %d\n", temp);
        }
      }
    }
  }
  return 0;
}
