#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int N;
  cin >> N;
  int A[N];
  for (int i = (0); i < (N); ++i) cin >> A[i];
  int record = 1;
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N - 1; j++) {
      if (gcd(A[i], A[j]) > 1) {
        record = gcd(A[i], A[j]);
        if (record > 1) break;
      }
    }
  }
  if (record == 1) {
    cout << ("pairwise coprime") << '\n';
    return 0;
  }
  for (int i = (0); i < (N); ++i) {
    record = gcd(A[i], record);
    if (record == 1) break;
  }
  if (record == 1) {
    cout << ("setwise coprime") << '\n';
  } else {
    cout << ("not coprime") << '\n';
  }
  return 0;
}
