#include <bits/stdc++.h>
using ll = long long;
using namespace std;
stack<int> st;
queue<int> qu;
queue<pair<int, int> > qu2;
priority_queue<int> pq;
static const int NIL = -1;
static const int INF = 1000000007;
deque<int> deq;
const ll MOD = (1e+9) + 7;
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int l[1000005];
int main() {
  int n;
  cin >> n;
  vector<ll> a(n);
  bool pairwise = 1;
  bool setwise = 1;
  ll now = 0;
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
    if (i == 0) {
      now = a[i];
    } else {
      now = gcd(now, a[i]);
    }
    int b = a[i];
    int temp = 0;
    int d = 2;
    while (b % d == 0) {
      temp++;
      b /= d;
    }
    if (l[d] > 0 && temp > 0) pairwise = 0;
    l[d] += temp;
    temp = 0;
    for (d = 3; d <= b && b > 1; d += 2) {
      while (b % d == 0) {
        temp++;
        b /= d;
      }
      if (l[d] > 0 && temp > 0) pairwise = 0;
      l[d] += temp;
      temp = 0;
    }
  }
  if (now > 1) {
    setwise = 0;
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (setwise) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
