#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  vector<int> m(1000005);
  int g = 0;
  bool isCoprime = true;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    m[v[i]]++;
    if (m[v[i]] > 1) {
      isCoprime = false;
    }
    if (g == 0) {
      g = v[i];
    } else {
      g = gcd(g, v[i]);
    }
  }
  if (isCoprime) {
    vector<int> prime(1000005, true);
    prime[1] = false;
    for (int i = 2; i <= 1000000; i++) {
      if (prime[i]) {
        int cnt = 0;
        for (int j = i; j <= 1000000; j += i) {
          prime[j] = false;
          if (m[j] != 0) {
            cnt++;
          }
        }
        if (cnt > 1) {
          isCoprime = false;
        }
      }
    }
  }
  if (isCoprime) {
    cout << "pairwise coprime";
  } else if (g == 1) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
}
