#include <bits/stdc++.h>
using namespace std;
const long long INF = 2e18;
const long long MOD = 1e9 + 7;
long long N;
long long A[1000010];
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  cin >> N;
  for (long long i = 0; i < N; i++) cin >> A[i];
  sort(A, A + N);
  bool pairwise = true;
  bool isPrime[1000010];
  for (long long i = 1; i <= A[N - 1]; i++) isPrime[i] = true;
  for (long long i = 0; i < N; i++) {
    if (!isPrime[A[i]]) {
      pairwise = false;
      break;
    }
    vector<long long> v;
    long long a = A[i];
    for (long long j = 2; j <= a; j++) {
      if (a % j == 0) v.push_back(j);
      while (a % j == 0) a /= j;
    }
    if (a != 1) v.push_back(a);
    for (auto x : v) {
      for (long long j = x; j <= A[N - 1]; j += x) {
        isPrime[j] = false;
      }
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long _gcd = A[0];
  for (long long i = 1; i < N; i++) {
    _gcd = gcd(_gcd, A[i]);
  }
  if (_gcd == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
