#include <bits/stdc++.h>
using namespace std;
mt19937 mt_rand(
    chrono::high_resolution_clock::now().time_since_epoch().count());
const int INF = 2e9;
const long long ML = 4e18;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = (0); i < (n); ++i) cin >> a[i];
  int x = a[0];
  for (int i = (1); i < (n); ++i) x = gcd(x, a[i]);
  if (x != 1) {
    cout << "not coprime\n";
    return;
  }
  sort((a).begin(), (a).end());
  for (int i = (1); i < (n); ++i)
    if (a[i] == a[i - 1]) {
      cout << "setwise coprime\n";
      return;
    }
  vector<bool> vis(1000001, false);
  for (int i = (0); i < (n); ++i) vis[a[i]] = true;
  for (int i = (0); i < (n); ++i) {
    for (int j = 2; j * a[i] < 1000001; j++) {
      if (vis[j * a[i]]) {
        cout << "setwise coprime\n";
        return;
      }
    }
  }
  cout << "pairwise coprime\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
