#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  map<int, int> ma;
  int flag = 0;
  for (int i = 0; i < n; i++) {
    auto itr = ma.find(a[i]);
    if (itr == ma.end()) {
      ma[a[i]] = 1;
    } else {
      flag = 1;
      break;
    }
    for (int j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        auto itr = ma.find(j);
        if (itr == ma.end()) {
          ma[j] = 1;
        } else {
          flag = 1;
          break;
        }
        int t = a[i] / j;
        if (j != t) {
          auto itr_2 = ma.find(t);
          if (itr_2 == ma.end()) {
            ma[t] = 1;
          } else {
            flag = 1;
            break;
          }
        }
      }
    }
    if (flag == 1) {
      break;
    }
  }
  if (flag == 0) {
    cout << "pairwise coprime" << endl;
  } else {
    int k = a[0];
    for (int i = 1; i < n; i++) {
      k = gcd(k, a[i]);
      if (k == 1) {
        flag = 2;
        break;
      }
    }
    if (flag == 2) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
}
