#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
int* Eratosthenes(int N) {
  int* arr = new int[N];
  for (int i = 0; i < N; i++) {
    arr[i] = 1;
  }
  for (int i = 2; i < sqrt(N); i++) {
    if (arr[i]) {
      for (int j = 0; i * (j + 2) < N; j++) {
        arr[i * (j + 2)] = 0;
      }
    }
  }
  return arr;
}
int gcd(int a, int b) {
  if (a == 0) {
    return b;
  }
  if (b == 0) {
    return a;
  }
  if (a < b) gcd(b, a);
  int r;
  while ((r = a % b)) {
    a = b;
    b = r;
  }
  return b;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (N); ++i) {
    cin >> A[i];
  }
  int g = A[0];
  for (int i = 1; i < (N); ++i) g = gcd(g, A[i]);
  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  int* v = Eratosthenes(1e3 + 9);
  v[0] = 0;
  v[1] = 0;
  vector<int> B(1e6 + 9, 0);
  vector<int> pl;
  for (int i = 0; i < (1e3 + 2); ++i) {
    if (v[i] == 1) pl.push_back(i);
  }
  int max_s = 0;
  set<int> cl;
  for (int i = 0; i < (N); ++i) {
    int tmp = A[i];
    for (int j : pl) {
      if (tmp == 1) break;
      if (tmp % j != 0) continue;
      B[j]++;
      while (tmp % j == 0) {
        tmp /= j;
      }
    }
    if (tmp > 1) B[tmp]++;
  }
  for (int i = 2; i < (1e6 + 2); ++i) {
    max_s = max(max_s, B[i]);
  }
  if (max_s == 1)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
