#include <bits/stdc++.h>
using namespace std;
const vector<long long> DX = {0, -1, 0, 1, 1, 1, -1, -1};
const vector<long long> DY = {1, 0, -1, 0, 1, -1, 1, -1};
constexpr long long MOD = (1000000007);
const long long INF = (1LL << 60);
const double PI = (3.141592653589794);
const double EPS = (0.0000000001);
template <class tuple<long long, long long, long long>>
inline bool chmin(tuple<long long, long long, long long> &a,
                  tuple<long long, long long, long long> b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
} template <class tuple<long long, long long, long long>>
inline bool chmax(tuple<long long, long long, long long> &a,
                  tuple<long long, long long, long long> b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
} template <class tuple<long long, long long, long long>>
inline tuple<long long, long long, long long> ceil(
    tuple<long long, long long, long long> a,
    tuple<long long, long long, long long> b) {
  return tuple<long long, long long, long long>((a + b - 1) / b);
} template <class tuple<long long, long long, long long>>
inline tuple<long long, long long, long long> round(
    tuple<long long, long long, long long> a,
    tuple<long long, long long, long long> b) {
  return tuple<long long, long long, long long>(a / b);
} template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
  is >> p.first >> p.second;
  return is;
}
template <class tuple<long long, long long, long long>>
inline void out(tuple<long long, long long, long long> &a) {
  bool flag = true;
  for (auto &x : a) {
    if (flag) {
      flag = false;
    } else {
      cout << ' ';
    }
    cout << x;
  }
  cout << endl;
} long long nmax = 200000;
vector<vector<long long>> G(nmax);
long long n;
vector<long long> a;
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
long long mod_pow(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) {
      res = res * x % MOD;
    }
    x = x * x % MOD;
    y >>= 1;
  }
  return res;
}
long long cmb(long long n, long long k) {
  if (n < k) {
    return 0;
  }
  long long res = 1, nn = n, kk = 1;
  k = min(k, n - k);
  for (long long i = 0; i < k; i++) {
    res *= nn - i;
    res /= kk + i;
  }
  return res;
}
long long comb(long long n, long long k) {
  long long res = 1;
  for (long long i = 0; i < k; i++) {
    (res *= (n - i) % MOD) %= MOD;
  }
  for (long long i = 1; i <= k; i++) {
    (res *= mod_pow(i, MOD - 2)) %= MOD;
  }
  return res;
}
long long to_int(string s) {
  long long n = s.size();
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    ans = ((ans * 10) + (s[i] - '0')) % MOD;
  }
  return ans;
}
long long DigitSum(long long x) {
  long long ret = 0;
  while (x) {
    ret++;
    x /= 10;
  }
  return ret;
}
bool is_prime(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return n != 1;
}
long long extgcd(long long a, long long b, long long &x, long long &y) {
  long long d = a;
  if (d != 0) {
    d = extgcd(b, a % b, y, x);
    y -= (a / b) * x;
  } else {
    x = 1, y = 0;
  }
  return 0;
}
vector<long long> pri;
bool inited = false;
void init(long long x) {
  vector<bool> flag(x + 1, false);
  for (long long i = 2; i <= x; i++) {
    if (flag[i]) continue;
    pri.emplace_back(i);
    for (long long j = i; j <= x; j += i) flag[j] = true;
  }
  inited = true;
}
vector<pair<long long, long long>> pfact(long long n) {
  vector<pair<long long, long long>> res;
  if (inited) {
    for (long long &p : pri) {
      if (n % p != 0) continue;
      long long cnt = 0;
      while (n % p == 0) {
        ++cnt;
        n /= p;
      }
      res.emplace_back(p, cnt);
    }
  } else {
    for (long long p = 2; p * p <= n; ++p) {
      if (n % p != 0) continue;
      long long cnt = 0;
      while (n % p == 0) {
        ++cnt;
        n /= p;
      }
      res.emplace_back(p, cnt);
    }
  }
  if (n != 1) res.emplace_back(n, 1);
  return res;
}
void solve4ts() {
  cin >> n;
  a.resize(n);
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  long long g = a[0];
  for (long long i = 0; i < n; ++i) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    long long dame = 0;
    map<long long, long long> d;
    init(1000 + 1);
    for (auto x : pri) {
      long long memo = 0;
      for (long long i = 0; i < n; ++i) {
        d[a[i]]++;
        if (d[a[i]] == 2) dame++;
        if (a[i] % x == 0) {
          memo++;
        }
      }
      if (memo >= 2) dame++;
    }
    if (dame == 0) {
      cout << "pairwise coprime" << endl;
    } else {
      cout << "setwise coprime" << endl;
    }
  } else {
    cout << "not coprime" << endl;
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(15);
  long long repeat = 1;
  while (repeat--) solve4ts();
}
