#include <bits/stdc++.h>
const double PI = acos(-1);
using namespace std;
long long gcd(long long a, long long b) {
  long long c;
  while (b != 0) {
    c = a % b;
    a = b;
    b = c;
  }
  return a;
}
int A[1000001];
int mi[1000001];
int mx[1000001];
int prime[1001];
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int N;
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cin >> A[i];
  }
  for (int i = 2; i <= 1000000; i++) mi[i] = 1000;
  vector<int> P;
  for (int i = 2; i <= 1000; i++) {
    if (prime[i] == 0) {
      P.push_back(i);
      for (int j = 2; j * i <= 1000; j++) {
        prime[i * j] = 1;
      }
    }
  }
  int check = 0;
  for (int i = 1; i <= N; i++) {
    int idx = 0;
    int cnt = 0;
    while (A[i] > 1 && idx < P.size()) {
      if (A[i] % P[idx] == 0) {
        A[i] /= P[idx];
        cnt++;
      } else {
        if (mx[P[idx]] > 0 && cnt > 0) check = 1;
        mi[P[idx]] = min(mi[P[idx]], cnt);
        mx[P[idx]] = max(mx[P[idx]], cnt);
        cnt = 0;
        idx++;
      }
    }
    if (A[i] > 1 && idx < P.size()) {
      if (mx[A[i]] > 0) check = 1;
      mi[A[i]] = min(mi[A[i]], 1);
      mx[A[i]] = max(mx[A[i]], 1);
    }
  }
  for (int i = 2; i <= 1000000; i++) {
    if (mi[i] > 0 && mi[i] < 1000) check = 2;
  }
  if (check == 0)
    cout << "pairwise coprime";
  else if (check == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
