#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1000000000 + 7;
ll gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; }
int main() {
  ll N;
  cin >> N;
  bool flag = true;
  vector<ll> A(N);
  ll a;
  for (ll i = 0; i < N; i++) {
    cin >> A[i];
  }
  ll r = gcd(A[0], A[1]);
  for (ll i = 2; i < N; i++) {
    if (A[i] == 0 || r == 0) {
      continue;
    }
    r = gcd(r, A[i]);
  }
  for (ll i = 0; i < N - 1; i++) {
    if (flag == false) {
      break;
    }
    for (ll j = i + 1; j < N; j++) {
      a = gcd(A[i], A[j]);
      if (a != 1) {
        flag = false;
        break;
      }
    }
  }
  if (a == 1) {
    cout << "pairwise coprime" << endl;
  } else {
    if (r == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
}
