#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 1e9 + 7;
ll pwr(ll a, ll b);
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
const int N = 1e6 + 10;
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  int mx = 0;
  for (int &x : a) {
    cin >> x;
    mx = max(mx, x);
  }
  int g = 0;
  for (int i = 0; i < n; i++) {
    g = gcd(a[i], g);
  }
  bool pw = true;
  unordered_map<int, int> mp;
  for (int i = 0; i < n; i++) {
    if (mp.count(a[i])) {
      pw = false;
      break;
    }
    mp[a[i]]++;
  }
  if (!pw) {
    if (g == 1) {
      cout << "setwise coprime\n";
    } else {
      cout << "not coprime\n";
    }
  } else {
    for (int i = 2; i < mx; i++) {
      int cnt = 0;
      for (int j = i; j <= mx; j += i) {
        if (mp.count(j)) {
          cnt++;
        }
      }
      if (cnt > 1) {
        pw = false;
        break;
      }
    }
    if (!pw) {
      if (g == 1) {
        cout << "setwise coprime\n";
      } else {
        cout << "not coprime\n";
      }
    } else {
      cout << "pairwise coprime\n";
    }
  }
}
ll pwr(ll a, ll b) {
  a %= mod;
  ll res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
