#include <bits/stdc++.h>
using namespace std;
char rsht[101326];
int primes[101326];
int szp = 0;
int primeUsedBy[101326];
int collon[101326];
int n, m;
int bp(int numb) {
  int l = 0;
  int r = szp;
  while (primes[l] != numb) {
    int mid = (l + r) / 2;
    if (primes[mid] > numb) {
      r = mid;
    } else {
      l = mid;
    }
  }
  return l;
}
void deletePrimeUsed(int numb) {
  int sqrtN = sqrt(double(numb)) + 1;
  for (int i = 0; primes[i] <= sqrtN; i++) {
    while (numb % primes[i] == 0) {
      numb /= primes[i];
      primeUsedBy[i] = -1;
    }
  }
  if (numb != 1) {
    int pos = bp(numb);
    primeUsedBy[pos] = -1;
  }
}
void addPrimeUsed(int numb) {
  int startnumb = numb;
  int sqrtN = sqrt(double(numb)) + 1;
  for (int i = 0; primes[i] <= sqrtN; i++) {
    while (numb % primes[i] == 0) {
      numb /= primes[i];
      primeUsedBy[i] = startnumb;
    }
  }
  if (numb != 1) {
    int pos = bp(numb);
    primeUsedBy[pos] = startnumb;
  }
}
int tryStart(int numb) {
  int sqrtN = sqrt(double(numb)) + 1;
  for (int i = 0; primes[i] <= sqrtN; i++) {
    while (numb % primes[i] == 0) {
      numb /= primes[i];
      if (primeUsedBy[i] != -1) return primeUsedBy[i];
    }
  }
  if (numb != 1) {
    int pos = bp(numb);
    if (primeUsedBy[pos] != -1) return primeUsedBy[pos];
  }
  return -1;
}
int main() {
  for (int i = 2; i <= 100000; i++) {
    if (!rsht[i]) {
      primes[szp++] = i;
      for (int j = i + i; j <= 100000; j += i) rsht[j] = 1;
    }
  }
  for (int i = 0; i < szp; i++) primeUsedBy[i] = -1;
  cin >> n >> m;
  char c;
  int numb;
  for (int i = 0; i < m; i++) {
    cin >> c >> numb;
    if (c == '-') {
      if (collon[numb - 1]) {
        cout << "Success\n";
        collon[numb - 1] = 0;
        deletePrimeUsed(numb);
      } else {
        cout << "Already off\n";
      }
    } else {
      if (collon[numb - 1]) {
        cout << "Already on\n";
      } else {
        int conflict = tryStart(numb);
        if (conflict == -1) {
          cout << "Success\n";
          collon[numb - 1] = 1;
          addPrimeUsed(numb);
        } else {
          cout << "Conflict with " << conflict << endl;
        }
      }
    }
  }
  return 0;
}
