#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> Nums(1000001, 0), Primes(1000001, 1);
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) {
    int A;
    cin >> A;
    Nums[A]++;
  }
  int now = 2;
  while (now <= 1000000) {
    int num = 0;
    int a = now;
    num += Nums[a];
    while (a + now <= 1000000) {
      a += now;
      Primes[a] = 0;
      num += Nums[a];
    }
    if (num == N) {
      cout << "not coprime" << endl;
      return 0;
    }
    if (num > 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
    now++;
    while (now <= 1000000 && !Primes[now]) now++;
  }
  cout << "pairwise coprime" << endl;
}
