#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
using ll = long long;
using P = pair<ll, ll>;
const long double PI = acos(-1.0L);
ll GCD(ll a, ll b) { return b ? GCD(b, a % b) : a; }
ll LCM(ll a, ll b) { return a / GCD(a, b) * b; }
vector<int> primeno(1000100, -1);
void Eratosthenes(int n) {
  primeno.at(0) = 0;
  primeno.at(1) = 1;
  int limit = n + 1;
  for (int i = 2; i < limit; ++i) {
    if (primeno.at(i) == -1) {
      primeno.at(i) = i;
      for (int j = 0; i * (j + 2) < n + 1; ++j) {
        if (primeno[i * (j + 2)] == -1) {
          primeno[i * (j + 2)] = i;
        }
      }
    }
  }
}
ll n;
int main() {
  cin >> n;
  vector<ll> avec(n, 0);
  for (int i = 0; i < n; ++i) cin >> avec[i];
  sort(avec.begin(), avec.end(), greater<ll>());
  ll amax = 1000005;
  Eratosthenes(amax + 1);
  vector<int> cnt(amax + 1, 0);
  vector<set<int> > prime(n);
  for (int i = 0; i < n; ++i) {
    ll now = avec[i];
    while (1) {
      if (now == 1) break;
      prime[i].insert(primeno[now]);
      now /= primeno[now];
    }
  }
  for (int i = 0; i < n; ++i) {
    for (auto x : prime[i]) {
      cnt[x]++;
    }
  }
  int ch = 0;
  if (n == 2) {
    for (int i = 0; i <= amax; ++i) {
      if (cnt[i] == n) {
        ch = 2;
        break;
      }
    }
    cout << "ok" << endl;
    return 0;
  } else {
    for (int i = 0; i <= amax; ++i) {
      if (cnt[i] == n) {
        ch = 2;
        break;
      } else if (cnt[i] >= 2) {
        ch = 1;
        break;
      }
    }
  }
  if (ch == 0)
    cout << "pairwise coprime" << endl;
  else if (ch == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
