#include <bits/stdc++.h>
using namespace std;
long long divCnt[100005], isOn[100005], sp[100005];
bool isPrime[100005];
long long convert(string str) {
  long long num = 0;
  for (long long i = 2; i < str.size(); i++) {
    num = num * 10 + (str[i] - '0');
  }
  return num;
}
void work(long long num) {
  long long number = num;
  bool res = true;
  while (num > 1) {
    if (divCnt[sp[num]]) {
      res = false;
      cout << "Conflict with " << divCnt[sp[num]] << endl;
      break;
    }
    num /= sp[num];
  }
  if (res) {
    num = number;
    while (num > 1) {
      divCnt[sp[num]] = number;
      num /= sp[num];
    }
    isOn[number] = 1;
    cout << "Success" << endl;
  }
}
void cleanUp(long long num) {
  long long number = num;
  while (num > 1) {
    divCnt[sp[num]] = 0;
    num /= sp[num];
  }
  isOn[number] = 0;
  cout << "Success" << endl;
}
int main() {
  long long n, m;
  memset(isPrime, true, 100005);
  memset(divCnt, 0, 100005);
  memset(isOn, 0, 100005);
  for (long long i = 2; i < 100005; i += 2) {
    sp[i] = 2;
  }
  for (long long i = 3; i < 100005; i += 2) {
    if (isPrime[i]) {
      sp[i] = i;
      for (long long j = i; j * i < 100005; j += 2) {
        isPrime[j * i] = 0;
        sp[j * i] = i;
      }
    }
  }
  scanf("%lld %lld\n", &n, &m);
  while (m--) {
    string str;
    long long num;
    getline(cin, str);
    num = convert(str);
    if (num == 1) {
      if (str[0] == '+') {
        if (isOn[num]) {
          cout << "Already on" << endl;
        } else {
          isOn[num] = 1;
          cout << "Success" << endl;
        }
      } else {
        if (isOn[num]) {
          isOn[num] = 0;
          cout << "Success" << endl;
        } else {
          cout << "Already off" << endl;
        }
      }
    } else {
      if (str[0] == '+') {
        if (isOn[num]) {
          cout << "Already on" << endl;
        } else {
          work(num);
        }
      } else {
        if (isOn[num]) {
          cleanUp(num);
        } else {
          cout << "Already off" << endl;
        }
      }
    }
  }
  return 0;
}
