#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int gcd(int a, int b) {
  int r = a % b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
int main() {
  int N;
  cin >> N;
  set<int> A;
  string ans = "def";
  A.clear();
  int a;
  int pc = 1;
  for (int i = 0; i < N; i++) {
    cin >> a;
    if (a != 1) {
      if (A.find(a) == A.end()) {
        A.insert(a);
      } else {
        pc = 0;
      }
    }
  }
  int maxnum = 1e6 + 1;
  int flag = 0;
  vector<int> B(maxnum, 0);
  for (auto p : A) {
    B[p]++;
  }
  for (int i = 2; i < maxnum; i++) {
    flag = 0;
    for (int j = i; j < maxnum; j += i) {
      if (B[j] == 1 && flag == 0) {
        flag = 1;
      } else if (B[j] == 1 && flag == 1) {
        pc = 0;
        break;
      }
    }
  }
  if (pc == 1) {
    ans = "pairwise coprime";
  } else {
    int g = *A.begin();
    for (auto p : A) {
      g = gcd(g, p);
    }
    if (g == 1) {
      ans = "setwise coprime";
    } else {
      ans = "not coprime";
    }
  }
  cout << ans << endl;
  return 0;
}
