#include <bits/stdc++.h>
using namespace std;
struct edge {
  long long int x, c;
};
long long int mod(long long int a, long long int mod) {
  long long int res = a % mod;
  if (res < 0) res = res + mod;
  return res;
}
long long int modpow(long long int a, long long int n, long long int mod) {
  long long int res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
long long int modinv(long long int a, long long int mod) {
  long long int b = mod, u = 1, v = 0;
  while (b) {
    long long int t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= mod;
  if (u < 0) u += mod;
  return u;
}
long long int gcd(long long int a, long long int b) {
  long long int r = a % b;
  if (r == 0)
    return b;
  else
    return gcd(b, a % b);
}
bool is_prime(long long int n) {
  long long int i = 2;
  if (n == 1) return false;
  if (n == 2) return true;
  bool res = true;
  while (i * i < n) {
    if (n % i == 0) {
      res = false;
    }
    i = i + 1;
  }
  if (n % i == 0) res = false;
  return res;
}
struct UnionFind {
  long long int N;
  vector<long long int> p;
  vector<long long int> cnt;
  UnionFind(long long int n) {
    N = n;
    p = vector<long long int>(N);
    cnt = vector<long long int>(N, 0);
    for (long long int i = 0; i < (N); i++) {
      p[i] = i;
      cnt[i] = 1;
    }
  }
  void con(long long int a, long long int b) {
    pair<long long int, long long int> at = root(a);
    pair<long long int, long long int> bt = root(b);
    if (at.second != bt.second) {
      if (at.first > bt.first) {
        swap(at, bt);
        swap(a, b);
      }
      p[at.second] = bt.second;
      cnt[bt.second] += cnt[at.second];
      p[a] = bt.second;
    }
  }
  pair<long long int, long long int> root(long long int a) {
    long long int atmp = a;
    long long int c = 0;
    while (atmp != p[atmp]) {
      atmp = p[atmp];
      c++;
    }
    p[a] = atmp;
    return {c, atmp};
  }
  bool is_con(long long int a, long long int b) {
    pair<long long int, long long int> at = root(a);
    pair<long long int, long long int> bt = root(b);
    return at.second == bt.second;
  }
};
struct dijkstra {
  long long int N;
  vector<long long int> d;
  vector<vector<edge>> e;
  dijkstra(long long int n) {
    N = n;
    e = vector<vector<edge>>(N);
  }
  void add_edge(long long int from, long long int to, long long int cost) {
    e[from].push_back({to, cost});
  }
  void run(long long int start) {
    priority_queue<pair<long long int, long long int>,
                   vector<pair<long long int, long long int>>,
                   greater<pair<long long int, long long int>>>
        que;
    que.push({0, start});
    d = vector<long long int>(N, 1e18);
    d[start] = 0;
    while (!que.empty()) {
      pair<long long int, long long int> q = que.top();
      que.pop();
      long long int dc = q.first;
      long long int x = q.second;
      if (dc > d[x]) {
        continue;
      } else {
        for (auto ip : e[x]) {
          if (d[ip.x] <= d[x] + ip.c) {
            continue;
          } else {
            d[ip.x] = d[x] + ip.c;
            que.push({d[ip.x], ip.x});
          }
        }
      }
    }
  }
};
int main() {
  long long int N;
  cin >> N;
  vector<long long int> A(N);
  for (long long int i = 0; i < (N); i++) cin >> A[i];
  bool pairwise = true;
  long long int primes[] = {
      2,   3,   5,   7,   11,  13,  17,  19,  23,  29,  31,  37,  41,  43,
      47,  53,  59,  61,  67,  71,  73,  79,  83,  89,  97,  101, 103, 107,
      109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181,
      191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263,
      269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349,
      353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433,
      439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521,
      523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613,
      617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701,
      709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809,
      811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887,
      907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997};
  vector<long long int> frac(1000000, 0);
  set<long long int> rest;
  for (long long int i = 0; i < (N); i++) {
    long long int a = A[i];
    for (auto ip : primes) {
      while (a % ip == 0) {
        a /= ip;
        if (frac[ip] != 0) {
          pairwise = false;
        }
        if (a == 1) break;
      }
      if (A[i] % ip == 0) frac[ip]++;
    }
    rest.insert(a);
  }
  pairwise = pairwise and rest.size() == 1 and *rest.begin() == 1;
  if (pairwise) {
    cout << "pairwise coprime";
  } else {
    long long int restn = 0;
    frac = vector<long long int>(1001, 0);
    long long int a = A[0];
    for (auto ip : primes) {
      while (a % ip == 0) {
        a /= ip;
        frac[ip]++;
      }
    }
    rest.insert(a);
    bool ans = true;
    for (long long int i = 0; i < (N - 1); i++) {
      long long int a = A[i + 1];
      for (auto ip : primes) {
        long long int cnt = 0;
        while (a % ip == 0) {
          a /= ip;
          cnt++;
        }
        frac[ip] = min(frac[ip], cnt);
        if (a == 1) break;
      }
      rest.insert(a);
    }
    for (auto iv : frac) {
      ans = ans and iv == 0;
    }
    ans = ans and rest.size() == 1 and *rest.begin() == 1;
    if (ans) {
      cout << "setwise coprime";
    } else {
      cout << "not coprime";
    }
  }
  return 0;
}
