#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using MATRIX = vector<vector<ll> >;
int N;
int a[1000000];
int b[1000001] = {0};
vector<int> v;
int c[1000001] = {0};
int obj;
int main() {
  cin >> N;
  for (int i = 0; i < (int)(N); ++i) {
    cin >> a[i];
  }
  bool f = false;
  for (int i = 0; i < (int)(N); ++i) {
    if (c[a[i]] > 0) {
      f = true;
      continue;
    }
    c[a[i]]++;
    v.push_back(a[i]);
  }
  obj = v.size();
  for (int i = 0; i < (int)(v.size()); ++i) {
    int x = v[i];
    for (int j = 2; j * j <= v[i]; j++) {
      if (x % j == 0) {
        b[j]++;
        if (b[j] == obj) {
          cout << "not coprime" << endl;
          return 0;
        }
        if (b[j] >= 2) {
          f = true;
        }
      }
      while (x % j == 0) {
        x /= j;
      }
    }
    if (x != 1) {
      b[x]++;
      if (b[x] == obj) {
        cout << "not coprime" << endl;
        return 0;
      }
      if (b[x] >= 2) {
        f = true;
      }
    }
  }
  if (f)
    cout << "setwise coprime" << endl;
  else
    cout << "pairwise coprime" << endl;
  return 0;
}
