#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[1000001];
int main() {
  cin >> N;
  for (int i = 0; i < (int)(N); ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < (int)(N); ++i) {
    int x = a[i];
    for (int j = 2; j * j <= a[i]; j++) {
      if (x % j == 0) {
        v[i].push_back(j);
        b[j]++;
      }
      while (x % j == 0) {
        x /= j;
      }
    }
    if (x != 1) {
      v[i].push_back(x);
      b[x]++;
    }
  }
  bool f = false;
  for (int i = 0; i < (int)(N); ++i) {
    if (b[i] == N) {
      cout << "not coprime" << endl;
      return 0;
    }
    if (b[i] >= 2) {
      f = true;
    }
  }
  if (f)
    cout << "setwise coprime" << endl;
  else
    cout << "pairwise coprime" << endl;
  return 0;
}
