#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5, mod = 1e9 + 7, inf = 0x3f3f3f3f;
int n, m, Q, K, T;
int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
int a[maxn], p[maxn];
bool pd1() {
  int Max = 0;
  for (int i = (1); i <= (n); ++i) Max = max(Max, a[i]);
  for (int i = (2); i <= (Max); ++i) {
    int fl = 0;
    for (int j = 1; j * i <= Max; ++j) {
      fl += p[i * j];
    }
    if (fl > 1) return false;
  }
  return true;
}
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
bool pd2() {
  int res = a[1];
  for (int i = (2); i <= (n); ++i) res = gcd(res, a[i]);
  if (res == 1) return true;
  return false;
}
signed main() {
  n = read();
  for (int i = (1); i <= (n); ++i) a[i] = read(), p[a[i]] = 1;
  if (pd1())
    puts("pairwise coprime");
  else if (pd2())
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
