#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int main() {
  int N;
  cin >> N;
  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;
  }
  bool isprime[1000002];
  for (int i = 2; i <= 1000001; ++i) {
    isprime[i] = true;
    for (int j = 2; j <= 1000 && j < i; ++j) {
      if (i % j != 0) {
        isprime[i] = false;
        break;
      }
    }
  }
  for (int i = 2; i <= 1000000; ++i) {
    int cnt = 0;
    if (!isprime[i]) continue;
    for (int j = 0; j < N; ++j) {
      if (A[j] % i == 0) {
        cnt++;
        if (cnt >= 2) {
          cout << "setwise coprime" << endl;
          return 0;
        }
      }
    }
  }
  cout << "pairwise coprime" << endl;
}
