#include <bits/stdc++.h>
using namespace std;
vector<int> prime;
bool is[1000001];
int cnt[1000001];
void gen() {
  for (int i = 0; i <= 1000000; i++) is[i] = true;
  is[0] = is[1] = false;
  for (int i = 2; i <= 1000000; i++) {
    for (int j = i + i; j <= 1000000; j += i) {
      is[j] = false;
    }
  }
  for (int i = 2; i <= 1000000; i++) {
    if (is[i] == true) prime.push_back(i);
  }
}
int main() {
  gen();
  int a;
  cin >> a;
  int arr[a];
  for (int i = 0; i < a; i++) cin >> arr[i];
  for (int i = 0; i < a; i++) {
    int cur = arr[i];
    for (int i = 0; i < prime.size(); i++) {
      if (cur % prime[i] == 0) {
        cur /= prime[i];
        cnt[prime[i]]++;
      }
      while (cur % prime[i] == 0) cur /= prime[i];
      if (cur == 1) {
        break;
      }
    }
  }
  int key1 = 0, key2 = 0;
  for (int i = 1; i <= 10; i++) {
    if (cnt[i] >= 2) key1 = 1;
    if (cnt[i] == a) key2 = 1;
  }
  if (key1 == 0)
    cout << "pairwise coprime\n";
  else if (key2 == 0)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
}
