#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000")
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (1ll * (a / gcd(a, b)) * b); }
long long phi(long long n) {
  long long result = n;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) n /= i;
      result -= result / i;
    }
  }
  if (n > 1) result -= result / n;
  return result;
}
long long binmul(long long a, long long b, long long c) {
  long long r = 0;
  a %= c;
  while (b > 0) {
    if (b & 1) r += a;
    a += a;
    r %= c;
    a %= c;
    b /= 2;
  }
  r = (r + c) % c;
  return r;
}
long long binpow(long long a, long long n, long long c) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = binmul(res, a, c);
    a = binmul(a, a, c);
    n /= 2;
  }
  res = (res + c) % c;
  return res;
}
void nxi(int& n) {
  bool min = 0;
  char c;
  n = 0;
  while ((c = getc(stdin)) && c <= 32)
    ;
  if (c == '-')
    min = 1;
  else
    n = c - 48;
  while ((c = getc(stdin)) && c > 32) n = (n << 3) + (n << 1) + c - 48;
  if (min) n = -n;
}
void prl(long long n) {
  if (n == 0) {
    puts("0");
    return;
  }
  if (n < 0) {
    putchar('-');
    n = -n;
  }
  static int s[19];
  int top = 0;
  while (n > 0) s[top++] = n % 10, n /= 10;
  while (top--) putchar(s[top] + 48);
  puts("");
}
using namespace std;
const int nmax = 300010;
int n, m;
set<int> a[nmax];
int on[nmax];
int conflict(int);
void add(int x) {
  if (on[x]) {
    puts("Already on");
    return;
  }
  if (conflict(x) > 0) {
    printf("Conflict with %d\n", conflict(x));
    return;
  }
  on[x] = 1;
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      a[i].insert(x);
      int p = (x / i);
      if (p > i) a[p].insert(x);
    }
  }
  if (x != 1) a[x].insert(x);
  puts("Success");
}
void erase(int x) {
  if (on[x] == 0) {
    puts("Already off");
    return;
  }
  on[x] = 0;
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      a[i].erase(x);
      int p = (x / i);
      if (p > i) a[p].erase(x);
    }
  }
  a[x].erase(x);
  puts("Success");
}
int conflict(int x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      if (a[i].size() >= 1) {
        set<int>::iterator it = a[i].begin();
        if (*it == x) it++;
        return *it;
      }
      int p = (x / i);
      if (a[p].size() >= 1) {
        set<int>::iterator it = a[p].begin();
        if (*it == x) it++;
        return *it;
      }
    }
  }
  set<int>::iterator it = a[x].begin();
  if (a[x].size() > 1) {
    if (*it == x) it++;
    return *it;
  }
  if (a[x].size() == 1 && *it != x) return *it;
  return -1;
}
int main() {
  scanf("%d %d\n", &n, &m);
  int cnt = 0;
  while (m--) {
    cnt++;
    char c;
    int x;
    scanf("%c %d\n", &c, &x);
    if (c == '+')
      add(x);
    else
      erase(x);
  }
  return 0;
}
