#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
class Main {
  int N;
  vector<ll> A;
  ll gcd(ll a, ll b) { return a ? gcd(b % a, a) : b; }
  void input() {
    cin >> N;
    A.resize(N);
    for (int i = 0; i < N; ++i) {
      cin >> A[i];
    }
  }
  void output() {
    ll g = A[0];
    for (int i = 0; i < N - 1; ++i) {
      g = gcd(g, A[i + 1]);
    }
    if (g > 1) {
      cout << "not coprime" << endl;
      return;
    }
    vector<ll> prime;
    int a = 1000000;
    vector<int> memo(a);
    for (int i = 2; i < a; ++i) {
      if (memo[i]) continue;
      prime.emplace_back(i);
      for (ll j = i; i * j < a; ++j) {
        memo[i * j] = 1;
      }
    }
    for (auto &p : prime) {
      int cnt = 0;
      for (int i = 0; i < N; ++i) {
        cnt += A[i] % p == 0;
      }
      if (cnt > 1) {
        cout << "setwise coprime" << endl;
        return;
      }
    }
    cout << "pairwise coprime" << endl;
  }

 public:
  Main() {
    input();
    output();
  }
};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  Main();
  return 0;
}
