#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using ll = long long;
using ld = long double;
using namespace std;
const ll INF = 1000000000000000000;
const ll mod = 1000000007;
const ld pi = 3.141592653589793238;
bool IsPrime(ll num) {
  if (num < 2)
    return false;
  else if (num == 2)
    return true;
  else if (num % 2 == 0)
    return false;
  double sqrtNum = sqrt(num);
  for (int i = 3; i <= sqrtNum; i += 2) {
    if (num % i == 0) {
      return false;
    }
  }
  return true;
}
ll gcd(ll a, ll b) {
  if (a < b) swap(a, b);
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
map<ll, ll> res;
void prime_factor(ll n) {
  for (ll i = 2; i * i <= n; i++) {
    ll aa = 0;
    while (n % i == 0) {
      aa = 1;
      n /= i;
    }
    if (aa == 1) {
      res[i]++;
    }
  }
  if (n != 1) {
    res[n]++;
  }
}
ll test[2345678];
signed main() {
  string s, t;
  ll n, m, k, a, b, c, cnt = 1, ans = 0;
  cin >> n;
  map<ll, ll> ok, ok2;
  ll ng = 0;
  for (ll i = 0; i < n; i++) {
    cin >> a;
    test[i] = a;
    if (i == 0) {
      cnt = a;
    } else {
      cnt = gcd(cnt, a);
    }
    if (a % 2 == 0) {
      ok2[2]++;
      if (ok2[2] >= 2) {
        ng++;
      }
    }
    if (a % 3 == 0) {
      ok2[3]++;
      if (ok2[3] >= 2) {
        ng++;
      }
    }
    if (a % 5 == 0) {
      ok2[5]++;
      if (ok2[5] >= 2) {
        ng++;
      }
    }
    ok[a]++;
    if (ok[a] >= 2) {
      ng++;
    }
  }
  if (ng == 0) {
    for (ll i = 0; i < n; i++) {
      if (!IsPrime(test[i])) {
        prime_factor(test[i]);
      }
    }
    for (int i = 2; i <= 1000002; i++) {
      if (res[i] > 1) {
        ans++;
        break;
      }
    }
  }
  if (ng == 0 && ans == 0) {
    cout << "pairwise coprime" << endl;
  } else if (cnt == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
