#include <bits/stdc++.h>
using namespace std;
int lpf[100050], mobius[100050];
void least_prime_factor() {
  for (int i = 2; i < 100050; i++)
    if (!lpf[i])
      for (int j = i; j < 100050; j += i)
        if (!lpf[j]) lpf[j] = i;
}
void Mobius() {
  for (int i = 1; i < 100050; i++) {
    if (i == 1)
      mobius[i] = 1;
    else {
      if (lpf[i / lpf[i]] == lpf[i])
        mobius[i] = 0;
      else
        mobius[i] = -1 * mobius[i / lpf[i]];
    }
  }
}
int gcd_pairs(int a[], int n) {
  int maxi = 0;
  int fre[100050] = {0};
  for (int i = 0; i < n; i++) {
    fre[a[i]]++;
    maxi = max(a[i], maxi);
  }
  least_prime_factor();
  Mobius();
  int ans = 0;
  for (int i = 1; i <= maxi; i++) {
    if (!mobius[i]) continue;
    int temp = 0;
    for (int j = i; j <= maxi; j += i) temp += fre[j];
    ans += temp * (temp - 1) / 2 * mobius[i];
  }
  return ans;
}
int gcd(int a, int b) {
  int r;
  while (a) {
    r = b % a;
    b = a;
    a = r;
  }
  return b;
}
int gcd_(int* A, int x) {
  int c = gcd(*A, *(A + 1));
  int i, g;
  for (i = 1; i < x - 1; i++) {
    g = gcd(c, *(A + 1 + i));
    c = g;
  }
  return c;
}
int fact(int n);
int nCr(int n, int r) { return fact(n) / (fact(r) * fact(n - r)); }
int fact(int n) {
  int res = 1;
  for (int i = 2; i <= n; i++) res = res * i;
  return res;
}
int main() {
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int a = gcd_pairs(arr, n);
  int b = gcd_(arr, n);
  if (a == nCr(n, 2))
    cout << "pairwise coprime";
  else if (b == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
