#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
long long power(long long b, long long e, long long m) {
  if (b == 0) return 0;
  if (e == 0) return 1;
  if (e & 1) return b * power(b * b % m, e / 2, m) % m;
  return power(b * b % m, e / 2, m);
}
long long power(long long b, long long e) {
  if (b == 0) return 0;
  if (e == 0) return 1;
  if (e & 1) return b * power(b * b, e / 2);
  return power(b * b, e / 2);
}
bool isPowerOfTwo(long long x) { return (x && !(x & (x - 1))); }
long long spf[1000001];
long long hash1[1000001] = {0};
void sieve() {
  spf[1] = 1;
  for (long long i = 2; i < 1000001; i++) spf[i] = i;
  for (long long i = 4; i < 1000001; i += 2) spf[i] = 2;
  for (long long i = 3; i * i < 1000001; i++) {
    if (spf[i] == i) {
      for (long long j = i * i; j < 1000001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
void getFactorization(long long x) {
  long long temp;
  while (x != 1) {
    temp = spf[x];
    if (x % temp == 0) {
      hash1[spf[x]]++;
      x = x / spf[x];
    }
    while (x % temp == 0) x = x / temp;
  }
}
bool check(long long x) {
  long long temp;
  while (x != 1) {
    temp = spf[x];
    if (x % temp == 0 && hash1[temp] > 1) return false;
    while (x % temp == 0) x = x / temp;
  }
  return true;
}
bool hasValidNum(long long arr[], long long n) {
  sieve();
  for (long long i = 0; i < n; i++) getFactorization(arr[i]);
  for (long long i = 0; i < n; i++)
    if (check(arr[i])) return true;
  return false;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long findGCD(long long arr[], long long n) {
  long long result = arr[0];
  for (long long i = 1; i < n; i++) result = gcd(arr[i], result);
  return result;
}
void solve() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < n; i++) {
    if (a[i] == 1) {
      cout << "pairwise coprime";
      return;
    }
  }
  if (hasValidNum(a, n))
    cout << "pairwise coprime";
  else {
    if (findGCD(a, n) == 1) {
      cout << "setwise coprime";
    } else {
      cout << "not coprime";
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int tt = 1;
  while (tt--) {
    solve();
    cout << "\n";
  }
  return 0;
}
