#include <bits/stdc++.h>
using namespace std;
int prime[10005];
vector<int> vec;
int main() {
  int n;
  cin >> n;
  memset(prime, 0, sizeof(prime));
  for (int i = 2; i <= 1005; i++) {
    if (prime[i] == 0) {
      for (int j = i + i; j <= 1005; j += i) {
        prime[j] = 1;
      }
      vec.push_back(i);
    }
  }
  int a[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  map<int, int> mapp;
  int f = 0;
  for (int i = 1; i <= n; i++) {
    int pp = a[i];
    for (int j = 0; j < vec.size(); j++) {
      if (vec[j] > sqrt(a[i]) + 1) {
        break;
      }
      if (a[i] % vec[j] == 0) {
        while (pp % vec[j] == 0) {
          pp /= vec[j];
        }
        if (mapp[vec[j]] == 1) {
          f = 1;
        }
        mapp[vec[j]]++;
        if (mapp[vec[j]] == n) {
          cout << "not coprime" << endl;
          return 0;
        }
      }
    }
    if (!prime[pp]) {
      if (mapp[pp] == 1) {
        f = 1;
      }
      mapp[pp]++;
      if (mapp[pp] == n) {
        cout << "not coprime" << endl;
        return 0;
      }
    }
  }
  if (f == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "pairwise coprime" << endl;
  }
  return 0;
}
