#include <bits/stdc++.h>
using namespace std;
long long Ceil(long long val, long long div) { return (val + div - 1) / div; }
long long CeilN(long long val, long long div) { return Ceil(val, div) * div; }
long long FloorN(long long x, long long n) { return (x - x % n); }
bool IsOdd(long long x) { return ((x & 1) == 1); }
bool IsEven(long long x) { return ((x & 1) == 0); }
template <class T>
bool chmax(T& a, T b) {
  if (a <= b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T& a, T b) {
  if (a >= b) {
    a = b;
    return 1;
  }
  return 0;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) {
  long long gcdRes = gcd(a, b);
  return (a * (b / gcdRes));
}
bool isPrime(long long p) {
  for (long long i = 2; i <= sqrt(p); i++)
    if (p % i == 0) return false;
  return p > 1;
}
map<long long, long long> factMap;
void primeFactor(long long n) {
  if ((n % 2) == 0) {
    while ((n % 2) == 0) {
      n = n / 2;
    }
    factMap[2]++;
  }
  vector<long long> isFind(1000005, 0);
  for (long long i = 3; i <= sqrt(n); i += 2) {
    while ((n % i) == 0) {
      if (!isFind[n]) {
        isFind[n] = true;
        factMap[i]++;
      }
      n = n / i;
    }
  }
  if (n != 1) {
    if (!isFind[n]) {
      factMap[n] = 1;
    }
  }
}
void Solve() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (long long i = 0; i < (long long)N; ++i) cin >> A[i];
  sort((A).begin(), (A).end(), greater<long long>());
  long long gcdAll = gcd(A[0], A[1]);
  for (long long i = 0; i < (long long)N; ++i) {
    gcdAll = gcd(A[i], gcdAll);
  }
  if (gcdAll != 1) {
    cout << "not coprime" << endl;
    return;
  }
  for (long long i = 0; i < (long long)N; ++i) {
    primeFactor(A[i]);
  }
  for (auto one : factMap) {
    if (1 < one.second) {
      cout << "setwise coprime" << endl;
      return;
    }
  }
  cout << "pairwise coprime" << endl;
  return;
}
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  Solve();
  return 0;
}
