#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  vector<long long> A(N);
  vector<long long> Gcd(N);
  for (int i = 0; i < (N); i++) {
    cin >> A[i];
  }
  Gcd[N - 1] = A[N - 1];
  for (int i = (N - 1) - 1; i >= (0); i--) {
    Gcd[i] = gcd(Gcd[i + 1], A[i]);
  }
  if (Gcd[0] != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vector<bool> num(1e6 + 1, false);
  for (int i = 0; i < (N); i++) {
    if (num[A[i]]) {
      cout << "setwise coprime" << endl;
      return 0;
    }
    for (int j = (2); j < (sqrt((double)A[i]) + 0.01); j++) {
      if (A[i] % j == 0) {
        int id = j;
        while (id <= 1e6) {
          num[id] = true;
          id += j;
        }
      }
      while (A[i] % j == 0) {
        A[i] /= j;
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
