#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using P = pair<int, int>;
const int Max_A = 1e6 + 5;
const int INF = 1e8;
int divisor[Max_A];
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (int)(N); i++) cin >> A[i];
  for (int i = 0; i < (int)(Max_A); i++) divisor[i] = i;
  for (int i = 2; i * i < Max_A; i++) {
    if (divisor[i] == i) {
      for (int j = 2; j * i < Max_A; j++) divisor[j * i] = i;
    }
  }
  map<int, int> mp;
  for (int i = 0; i < (int)(N); i++) {
    int a = A[i];
    vector<int> p;
    while (a != divisor[a]) {
      a /= divisor[a];
      int s = p.size();
      if (divisor[a] != p[s - 1]) p.emplace_back(divisor[a]);
    }
    for (int j = 0; j < (int)(p.size()); j++) mp[p[j]]++;
    if (a != 1) mp[a]++;
  }
  bool pairwise = true, setwise = true;
  for (auto itr : mp) {
    int num = itr.second;
    if (num >= 2) pairwise = false;
    if (num == N) setwise = false;
  }
  for (int i = 0; i < (int)(N); i++)
    if (A[i] == 1) setwise = true;
  if (pairwise)
    cout << "pairwise coprime" << endl;
  else if (setwise)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
