#include <bits/stdc++.h>
using namespace std;
const long long int INF = (long long int)2e18 + 77;
const int N = (int)1e6 + 1;
int spf[N];
void Sieve() {
  int i;
  for (i = 1; i <= 1e6; i++) spf[i] = i;
  for (i = 2; i <= 1e6; i += 2) spf[i] = 2;
  for (i = 3; i * i <= 1e6; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j <= 1e6; j++) {
        if (spf[j] == j) spf[j] = i;
      }
    }
  }
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
void solve() {
  Sieve();
  int n, i;
  cin >> n;
  int A[n];
  for (i = 0; i < n; i++) cin >> A[i];
  int g = A[0];
  for (i = 1; i < n; i++) g = gcd(g, A[i]);
  if (g == 1) {
    unordered_map<int, int> check;
    int flag = 0;
    for (i = 0; i < n; i++) {
      int x = A[i];
      unordered_map<int, int> minicheck;
      while (x != 1) {
        if (check[spf[x]] > 0) {
          flag = 1;
          break;
        }
        minicheck[spf[x]]++;
        x /= spf[x];
      }
      for (auto it : minicheck) check[it.first] += it.second;
      if (flag == 1) break;
    }
    if (flag)
      cout << "setwise coprime\n";
    else
      cout << "pairwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
