#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  int allgcd;
  bool pairwise = true;
  vector<bool> st(1000005);
  vector<bool> sosu(1000005);
  for (int i = 2; i < 1000000; i++) {
    bool flag = true;
    for (int j = 2; j * j <= i; j++) {
      if (i % j == 0) flag = false;
    }
    if (flag) sosu[i] = true;
  }
  cin >> n;
  for (int i = 0; i < (n); i++) {
    int tmp;
    cin >> tmp;
    if (i == 0)
      allgcd = tmp;
    else
      allgcd = gcd(allgcd, tmp);
    if (tmp == 1) continue;
    if (pairwise) {
      if (sosu[tmp] == true) {
        if (st[tmp] == true)
          pairwise = false;
        else
          st[tmp] = true;
      } else {
        for (int a = 2; a * a <= tmp; a++) {
          if (tmp % a != 0) continue;
          while (tmp % a == 0) {
            tmp /= a;
          }
          if (st[a] == true)
            pairwise = false;
          else
            st[a] = true;
        }
      }
    }
  }
  if (pairwise)
    cout << "pairwise coprime";
  else if (allgcd == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
