#include <bits/stdc++.h>
using namespace std;
long long int lis[2000003];
long long int yakulis[2000003];
long long int gcd(long long int a, long long int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) cin >> lis[i];
  sort(lis, lis + N);
  int flg = 1;
  for (int i = 0; i < N - 1; i++) {
    if (lis[i] == lis[i + 1]) flg = 0;
  }
  for (long long int i = 0; i < N; i++) {
    for (long long int j = 1; j * j <= lis[i]; j++) {
      if (lis[i] % j == 0) {
        yakulis[j]++;
        if (j * j != lis[i]) yakulis[lis[i] / j]++;
        if (1 < yakulis[j] && j != 1) flg = 0;
        if (1 < yakulis[lis[i] / j]) flg = 0;
      }
    }
    if (flg == 0) break;
  }
  if (flg == 1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long int pa = gcd(lis[0], lis[1]);
  for (int i = 2; i < N; i++) {
    pa = gcd(lis[i], pa);
  }
  if (pa == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
