#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int findGCD(vector<long long> arr, long long n) {
  int result = arr[0];
  for (int i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
void solve() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  bool isSP = false;
  bool isCP = true;
  for (int i = 0; i <= n - 1; i++) cin >> a[i];
  for (int i = 0; i <= n - 2; i++) {
    if (isCP == false) break;
    for (int j = i + 1; j <= n - 1; j++) {
      if (gcd(a[i], a[j]) != 1) {
        isCP = false;
        break;
      }
    }
  }
  if (findGCD(a, n) == 1) isSP = true;
  if (isCP)
    cout << "pairwise coprime";
  else if (isSP)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
