#include <bits/stdc++.h>
using namespace std;
template <class T>
using V = vector<T>;
int gcd(int a, int b) {
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  V<int> A(N);
  for (int i = 0; i < (N); i++) cin >> A.at(i);
  V<bool> use(1000001, true);
  for (int i = 2; i < 500; i++) {
    int t = i + i;
    while (t <= 1000) {
      use.at(t) = false;
      t += i;
    }
  }
  set<int> S;
  for (int i = 2; i <= 1000; i++) {
    if (use.at(i)) S.insert(i);
  }
  bool flg1 = true;
  for (int i = 0; i < (N); i++) {
    int a = A.at(i);
    bool flg2 = true;
    for (auto itr = S.begin(); itr != S.end(); itr++) {
      int s = *itr;
      if (a % s == 0) {
        if (use.at(s)) {
          use.at(s) = false;
          flg2 = false;
        } else
          flg1 = false;
      }
    }
    if (flg2 && a != 1) {
      if (use.at(a))
        use.at(a) = false;
      else
        flg1 = false;
    }
  }
  if (flg1)
    cout << "pairwise coprime" << endl;
  else {
    int g = A.at(0);
    for (int i = 1; i < (N); i++) g = gcd(g, A.at(i));
    if (g == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
