#include <bits/stdc++.h>
using namespace std;
int mpow(int base, int exp);
void ipgraph(int m);
void DFS(int n);
bool isprime(long long n);
int gcd(int a, int b);
void rstgraph(int n);
const int mod = pow(10, 9) + 7;
const int N = 3e5, M = N;
vector<int> g[N];
int vis[N];
int nodes = 0;
int n;
vector<int> a;
bool pc = 0, sc = 0;
int result;
void calc(int i) {
  result = gcd(result, a[i]);
  if (result == 1) sc = 1;
}
void iluzn() {
  cin >> n;
  int i, j;
  for (i = 0; i < n; i++) {
    int p;
    cin >> p;
    a.push_back(p);
    if (i == 0)
      result = a[0];
    else {
      if (result != 1) calc(i);
    }
  }
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; i + 1 < n ? j < n : j > n; i + 1 < n ? j += 1 : j -= 1)
      if (gcd(a[i], a[j]) != 1) {
        if (sc)
          cout << "setwise coprime";
        else
          cout << "not coprime";
        return;
      }
  }
  cout << "pairwise coprime";
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t = 1, i;
  while (t--) iluzn();
  return 0;
}
int mpow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((long long)result * base) % mod;
    base = ((long long)base * base) % mod;
    exp >>= 1;
  }
  return result;
}
bool isprime(long long n) {
  if (n <= 1) return false;
  if (n == 2) return true;
  if (n % 2 == 0) return false;
  long long rt = sqrt(n);
  for (long long i = 3; i < rt; i += 2) {
    if (n % i == 0) return false;
  }
  return true;
}
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
void ipgraph(int m) {
  int u, v;
  while (m--) {
    cin >> u >> v;
    g[u].push_back(v);
  }
}
void DFS(int n) {
  ++nodes;
  vis[n] = 1;
  for (vector<int>::iterator i = g[n].begin(); i != g[n].end(); i++) {
    if (!vis[*i]) DFS(*i);
  }
}
void rstgraph(int n) {
  int i;
  for (i = 0; i < n + 1; i++) {
    g[i].clear();
    vis[i] = 0;
  }
  nodes = 0;
}
