#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 6;
const long long MOD = 1e9 + 7;
const long long LLINF = 1e18;
int n;
const int N = pow(10, 3) + 1;
vector<bool> isp(N + 1, true);
void sieve() {
  isp[0] = false;
  isp[1] = false;
  for (int i = 2; pow(i, 2) <= N; i++) {
    if (isp[i])
      for (int j = 2; i * j <= N; j++) isp[i * j] = false;
  }
}
int gcd(int a, int b) {
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
int main() {
  cin >> n;
  vector<int> a;
  vector<int> b(n);
  map<int, int> m;
  bool pcflg = true, scflg = true;
  for (int i = int(0); i < int(n); i++) {
    cin >> b[i];
    if (b[i] != 1) a.push_back(b[i]);
    m[b[i]]++;
    if (m[b[i]] > 1 && b[i] != 1) pcflg = false;
  }
  sieve();
  vector<int> primes;
  for (int i = 2; i <= N; ++i)
    if (isp[i]) primes.push_back(i);
  if (primes.size() < a.size()) pcflg = false;
  if (pcflg) {
    for (int i = int(0); i < int(primes.size()); i++) {
      int cnt = 0;
      for (int j = int(0); j < int(a.size()); j++) {
        if (a[j] % primes[i] == 0) ++cnt;
      }
      if (cnt > 1) {
        pcflg = false;
        break;
      }
    }
  }
  int tmp = b[0];
  for (int i = int(0); i < int(a.size()); i++) {
    if (a[i] > tmp)
      tmp = gcd(a[i], tmp);
    else
      tmp = gcd(tmp, a[i]);
  }
  if (tmp != 1) scflg = false;
  if (m[1] > 0) scflg = true;
  if (pcflg)
    cout << "pairwise coprime" << endl;
  else if (scflg)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
