#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;
}
unsigned gcd(unsigned x, unsigned y) {
  unsigned wk;
  if (x < y) {
    wk = x;
    x = y;
    y = wk;
  }
  while (y) {
    wk = x % y;
    x = y;
    y = wk;
  }
  return x;
}
int gcd_a(int n, int a[]) {
  if (n == 1) return a[0];
  if (n == 2) return gcd(a[0], a[1]);
  int h = n / 2;
  return gcd(gcd_a(h, &a[0]), gcd_a(n - h, &a[h]));
}
int main() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  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_a(n, arr);
  if (a == n * n)
    cout << "pairwise coprime";
  else if (b == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
