#include <bits/stdc++.h>
using namespace std;
int xgcd(int, int, int &, int &);
int gcd(int, int);
int modinv(int, int);
long long int modInverse(long long int, long long int);
long long int power(long long int, long long int, long long int);
long long int pow2(int);
int N;
vector<int> pr = {2, 3, 5, 7};
bool isprime(int n) {
  int i;
  int prime(int);
  if (n > 1000) return true;
  int sz = pr.size();
  int sq = sqrt(n);
  for (i = 1; i < sz; i++) {
    int p = pr[i];
    if (p > sq) return true;
    if (n % p == 0) return false;
  }
  for (;; i++) {
    int p = prime(i);
    if (p > sq) return true;
    if (n % p == 0) return false;
  }
}
int prime(int n) {
  int last = pr.size();
  if (n < last) return pr[n];
  for (int p = pr.back() + 2; last <= n; p += 2) {
    if (isprime(p)) {
      last++;
      pr.push_back(p);
    }
  }
  return pr.back();
}
map<long long int, int> lc;
map<long long int, int> fact(long long int n) {
  map<long long int, int> ret;
  long long int base;
  int ix;
  int i;
  for (i = 0; n > 1; i++) {
    base = prime(i);
    ix = 0;
    while (n % base == 0) {
      ix++;
      n /= base;
    }
    if (ix > 0) {
      ret[base] = ix;
      auto itr = lc.find(base);
      if (itr == lc.end()) {
        lc[base] = ix;
      } else {
        lc[base] = max(ix, lc[base]);
      }
    } else {
      if (base * base >= n) {
        ret[n] = 1;
        auto itr = lc.find(n);
        if (itr == lc.end()) {
          lc[n] = 1;
        } else {
          lc[n] = max(1, lc[n]);
        }
        break;
      }
    }
  }
  return ret;
}
map<int, int> lcm(map<int, int> m, map<int, int> n) {
  map<int, int> ret;
  for (auto itm = m.begin(); itm != m.end(); itm++) {
    auto itn = n.find(itm->first);
    if (itn == n.end()) {
      ret[itm->first] = itm->second;
    } else {
      ret[itm->first] = max(itm->second, itn->second);
      n.erase(itm->first);
    }
  }
  for (auto itn = n.begin(); itn != n.end(); itn++) {
    ret[itn->first] = itn->second;
  }
  return ret;
}
map<int, int> vdiv(map<int, int> m, map<int, int> n) {
  map<int, int> ret;
  for (auto itm = m.begin(); itm != m.end(); itm++) {
    auto itn = n.find(itm->first);
    if (itn == n.end()) {
      ret[itm->first] = itm->second;
    } else {
      ret[itm->first] = itm->second - itn->second;
      n.erase(itm->first);
    }
  }
  for (auto itn = n.begin(); itn != n.end(); itn++) {
    ret[itn->first] = -itn->second;
  }
  return ret;
}
int toInt(map<int, int> f, int m) {
  long long int lret = 1;
  for (auto itr = f.begin(); itr != f.end(); itr++) {
    for (int j = 0; j < itr->second; j++) {
      lret *= itr->first;
      lret %= m;
    }
  }
  return lret;
}
int gcd(int m, int n) {
  if (m < n) swap(m, n);
  while (m % n) {
    m %= n;
    swap(m, n);
  }
  return n;
}
int xgcd(int a, int b, int &x0, int &y0) {
  x0 = 1, y0 = 0;
  int x1 = 0, y1 = 1;
  int q;
  int at, x0t, y0t;
  while (b != 0) {
    q = a / b;
    at = b;
    b = a % b;
    a = at;
    x0t = x1;
    x1 = x0 - q * x1;
    x0 = x0t;
    y0t = y1;
    y1 = y0 - q * y1;
    y0 = y0t;
  }
  return a;
}
long long int xgcd(long long int a, long long int b, long long int &x0,
                   long long int &y0) {
  x0 = 1, y0 = 0;
  long long int x1 = 0, y1 = 1;
  long long int q;
  long long int at, x0t, y0t;
  while (b != 0) {
    q = a / b;
    at = b;
    b = a % b;
    a = at;
    x0t = x1;
    x1 = x0 - q * x1;
    x0 = x0t;
    y0t = y1;
    y1 = y0 - q * y1;
    y0 = y0t;
  }
  return a;
}
int modinv(int a, int m) {
  int g, x, y;
  g = xgcd(a, m, x, y);
  if (g != 1) return -1;
  x %= m;
  if (x < 0) x += m;
  return x;
}
long long int modinv(long long int a, long long int m) {
  long long int g, x, y;
  g = xgcd(a, m, x, y);
  if (g != 1) return -1;
  x %= m;
  if (x < 0) x += m;
  return x;
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int modInverse(long long int a, long long int m) {
  long long int ans = power(a, m - 2, m);
  return ans;
}
long long int pow2(int n) {
  long long int ret = 1;
  long long int r2 = 2;
  int i;
  for (i = n; i > 0; i /= 2) {
    if (i % 2) ret *= r2;
    ret %= 1000000007LL;
    r2 *= r2;
    r2 %= 1000000007LL;
  }
  return ret;
}
multimap<long long int, int> pmap;
set<long long int> pl;
int main() {
  prime(200);
  cin >> N;
  for (int i = 0; i < N; i++) {
    int ain;
    cin >> ain;
    for (int j = 0;; j++) {
      int px = pr[j];
      if (ain % px == 0) {
        pmap.emplace(px, i);
        ain /= px;
      }
      while (ain % px == 0) ain /= px;
      if (ain < px * px) break;
    }
    if (ain != 1) {
      pmap.emplace(ain, i);
    }
  }
  bool ispc, issc;
  ispc = true;
  issc = true;
  for (auto it = pl.begin(); it != pl.end(); it++) {
    if (pmap.count(*it) > 1) ispc = false;
    if ((int)pmap.count(*it) == N) issc = false;
  }
  if (ispc) {
    printf("pairwise coprime\n");
    return 0;
  }
  if (issc) {
    printf("setwise coprime\n");
    return 0;
  }
  printf("not coprime\n");
  return 0;
}
