#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e15;
const int mxN = 2e2;
vector<int> primes;
void SieveOfEratosthenes(int n) {
  vector<bool> prime(n + 1);
  for (int i = 0; i < n; i++) prime[i] = true;
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (int p = 2; p <= n; p++)
    if (prime[p]) primes.push_back(p);
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mp[a[i]]++;
  }
  sort(a.begin(), a.end());
  bool pairwise = true;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] == 1) continue;
    if (a[i] == a[i + 1]) {
      pairwise = false;
      break;
    }
  }
  SieveOfEratosthenes(1001);
  int times = primes.size();
  for (int p = 0; p < times; p++) {
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] % primes[p] == 0) cnt++;
    }
    if (cnt >= 2) {
      pairwise = false;
    }
  }
  if (pairwise == true) {
    cout << "pairwise coprime";
    return 0;
  }
  if (a[0] == 1) {
    cout << "setwise coprime";
    return 0;
  }
  for (int p = 0; p < times; p++) {
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] % primes[p] == 0) cnt++;
    }
    if (cnt == n) {
      cout << "not coprime";
      return 0;
    }
  }
  cout << "setwise coprime";
  return 0;
}
