#include <bits/stdc++.h>
using namespace std;
void go() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int seive[1000000];
vector<int> primes;
void seive_h() {
  memset(seive, 1, sizeof(seive));
  seive[0] = seive[1] = 0;
  for (int i = 2; i <= 1000; i++) {
    if (seive[i] == 0) continue;
    for (int j = i * i; j * j <= 1000000; j += i) {
      seive[j] = 0;
    }
    primes.push_back(i);
  }
}
int main() {
  go();
  seive_h();
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i += 1) cin >> arr[i];
  map<int, int> st;
  for (int x : arr) {
    for (int j = 0; j < primes.size(); j++) {
      if (x % primes[j] == 0) st[primes[j]]++;
    }
  }
  int flag = 0;
  for (auto node : st) {
    if (node.second > 1) {
      flag = 1;
      break;
    }
  }
  if (flag == 0)
    cout << "pairwise coprime";
  else {
    int g = 0;
    for (int x : arr) g = gcd(g, x);
    if (g == 1)
      cout << "setwise coprime";
    else
      cout << "not coprime";
  }
}
