#include <bits/stdc++.h>
using namespace std;
const int maN = 1e6 + 5;
bool isPrime[maN];
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void sieve() {
  isPrime[0] = true;
  isPrime[1] = true;
  for (int i = 2; i < maN; ++i) {
    if (!isPrime[i])
      for (int j = i; (long long)j * j < maN; j += i) {
        isPrime[j] = true;
      }
  }
}
int main() {
  int n;
  sieve();
  cin >> n;
  vector<int> a;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    a.push_back(x);
  }
  int pw = 1, sw = 1, ncp = 1;
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    if (!isPrime[a[i]]) cnt++;
  }
  if (cnt < n - 2) pw = 0;
  int gcds = gcd(a[0], a[1]);
  for (int i = 2; i < n; ++i) {
    gcds = gcd(gcds, a[i]);
  }
  if (gcds != 1) sw = 0;
  if (pw)
    cout << "pairwise coprime";
  else if (sw)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
