#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
using pii = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);

  int memo[1001000] = {};

  for (int i = 0; i < n; i++) {
    cin >> a[i];
    memo[a[i]]++;
  }

  sort(a.begin(), a.end());

  int totalgcd = a[0];

  for (int i = 1; i < n; i++) {
    totalgcd = __gcd(totalgcd, a[i]);
  }
  // if totalgcd = 1 setwise coprime

  bool flag = true;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (__gcd(a[i], a[j]) == 1) {
        continue;
      } else {
        flag = false;
        cout << (totalgcd == 1 ? "setwise coprime" : "not coprime") << endl;
        return 0;
      }
    }
  }

  cout << "pairwise coprime" << endl;
}