#include <map>
#include <set>
#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;

#define int long long

const int N = 1e6 + 10;

int l[N];
vector<int> p;

int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);   
  for (int i = 2; i < N; ++i) {
    if (!l[i]) {
      l[i] = i;
      p.push_back(i);
    }
    for (int j = 0; j < p.size() && p[j] <= l[i] && i * p[j] < N; ++j) {
      l[i * p[j]] = p[j];
    }
  }
  int n;
  cin >> n;
  int g = 0;
  map<int, int> m;
  for (int i = 0; i < n; ++i) {
    int z;
    cin >> z;
    set<int> s;
    while (l[z]) {
      s.insert(l[z]);
      z /= l[z];
    }
    for (int x : s) {
      ++m[x];
    }
    g = __gcd(g, z);
  }
  for (auto &i : m) {
    if (i.second > 1) {
      if (g == 1) {
        cout << "setwise coprime";
        return 0;
      }
    }
  }
  cout << "pairwise coprime";
  return 0;
}
