#include <bits/stdc++.h>
using namespace std;
const int SIZE = 1e6 + 1;
void sieve(vector<bool> &isprime, vector<int> &primes) {
  isprime[0] = false;
  isprime[1] = false;
  for (int i = 2; i < SIZE; i++) {
    if (!isprime[i]) continue;
    primes.push_back(i);
    for (int j = 2 * i; j < SIZE; j += i) {
      isprime[j] = false;
    }
  }
}
void solve() {
  vector<bool> isprime(SIZE, true);
  vector<int> primes;
  sieve(isprime, primes);
  int n;
  int m = primes.size();
  cin >> n;
  bool a[n][m];
  for (int i = 0; i < n; i++) {
    int temp;
    cin >> temp;
    for (int j = 0; j < m; j++) {
      if (temp % primes[j] == 0)
        a[i][j] = true;
      else
        a[i][j] = false;
    }
  }
  bool pair = true, set = true;
  for (int j = 0; j < m; j++) {
    int count = 0;
    for (int i = 0; i < n; i++) {
      if (a[i][j]) count++;
    }
    if (count > 1) pair = false;
    if (count == n) set = false;
  }
  if (pair)
    cout << "pairwise coprime\n";
  else if (set)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
