#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
ll gcd(ll a, ll b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int main() {
  vector<bool> prime(1000001, true);
  prime[1] = false;
  for (int i = 2; i * i <= 1000000; i++) {
    if (!prime[i]) continue;
    for (int j = i * 2; j <= 1000000; j += i) {
      prime[j] = false;
    }
  }
  int n;
  cin >> n;
  vector<ll> a;
  for (int i = (0); i < (n); ++i) {
    ll ai;
    cin >> ai;
    if (ai == 1) continue;
    a.push_back(ai);
  }
  n = (int)(a).size();
  if (n <= 1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (n >= 80000) {
    int ans = a[0];
    for (int i = (1); i < (n); ++i) {
      ans = gcd(ans, a[i]);
    }
    if (ans == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
    return 0;
  }
  vector<ll> b = a;
  set<int> cnt;
  vector<bool> isp(n, false);
  bool flag = true;
  for (int i = (0); i < (n); ++i) {
    if (a[i] <= 2000) continue;
    if (prime[a[i]]) {
      if (cnt.count(a[i])) {
        flag = false;
        break;
      }
      cnt.emplace(a[i]);
      isp[i] = true;
    }
  }
  for (int i = (1); i < (2001); ++i) {
    if (!prime[i]) continue;
    int k = 0;
    for (int j = (0); j < (n); ++j) {
      if (isp[j]) continue;
      if (a[j] % i == 0) {
        while (a[j] % i == 0) {
          a[j] /= i;
        }
        k++;
      }
      if (a[j] > 2000) {
        if (prime[a[j]]) {
          if (cnt.count(a[j])) {
            flag = false;
            break;
          }
          cnt.emplace(a[j]);
          isp[j] = true;
        }
      }
    }
    if (k > 1) flag = false;
  }
  if (flag) {
    cout << "pairwise coprime" << endl;
  } else {
    ll ans = b[0];
    for (int i = (1); i < (n); ++i) {
      ans = gcd(ans, b[i]);
    }
    if (ans == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
  return 0;
}
