#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
const int MAX = 1e5 + 5;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int lcm(long long int a, long long int b) {
  return (a * b) / gcd(a, b);
}
long long int powermod(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int prefix[MAX + 1];
void buildPrefix() {
  bool prime[MAX + 1];
  memset(prime, true, sizeof(prime));
  for (long long int p = 2; p * p <= MAX; p++) {
    if (prime[p] == true) {
      for (long long int i = p * 2; i <= MAX; i += p) prime[i] = false;
    }
  }
  prefix[0] = prefix[1] = 0;
  for (long long int p = 2; p <= MAX; p++) {
    prefix[p] = prefix[p - 1];
    if (prime[p]) prefix[p]++;
  }
}
long long int query(long long int L, long long int R) {
  return prefix[R] - prefix[L - 1];
}
vector<long long int> g[MAX];
long long int visited[MAX];
void dfs(long long int visited[MAX], long long int u, long long int v,
         vector<long long int> path) {
  visited[u] = 1;
  if (u == v) {
    for (long long int i = 0; i < path.size(); i++) {
      cout << path[i] << " ";
    }
    cout << "\n";
  } else {
    for (long long int i = 0; i < g[u].size(); i++) {
      long long int y = g[u][i];
      if (visited[y] == 0) {
        visited[y] = 1;
        path.push_back(y);
        dfs(visited, y, v, path);
        path.pop_back();
      }
    }
  }
  visited[u] = 0;
}
long long int lpf[100050], mobius[100050];
void least_prime_factor() {
  for (long long int i = 2; i < 100050; i++)
    if (!lpf[i])
      for (long long int j = i; j < 100050; j += i)
        if (!lpf[j]) lpf[j] = i;
}
void Mobius() {
  for (long long 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]];
    }
  }
}
long long int gcd_pairs(long long int a[], long long int n) {
  long long int maxi = 0;
  long long int fre[100050] = {0};
  for (long long int i = 0; i < n; i++) {
    fre[a[i]]++;
    maxi = max(a[i], maxi);
  }
  least_prime_factor();
  Mobius();
  long long int ans = 0;
  for (long long int i = 1; i <= maxi; i++) {
    if (!mobius[i]) continue;
    long long int temp = 0;
    for (long long int j = i; j <= maxi; j += i) temp += fre[j];
    ans += temp * (temp - 1) / 2 * mobius[i];
  }
  return ans;
}
long long int findProductSum(long long int A[], long long int n) {
  long long int array_sum = 0;
  for (long long int i = 0; i < n; i++) array_sum = (array_sum + A[i]) % M;
  long long int array_sum_square = (array_sum * array_sum) % M;
  long long int individual_square_sum = 0;
  for (long long int i = 0; i < n; i++)
    individual_square_sum += (A[i] * A[i]) % M;
  return ((array_sum_square - individual_square_sum % M) / 2) % M;
}
long long int findGCD(long long int arr[], long long int n) {
  long long int result = arr[0];
  for (long long int i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
void solve() {
  long long int n;
  cin >> n;
  long long int ar[n];
  for (long long int i = 0; i < n; i++) cin >> ar[i];
  long long int yy = findGCD(ar, n);
  long long int xx = gcd_pairs(ar, n);
  if (xx == (n * (n - 1)) / 2)
    cout << "pairwise coprime"
         << "\n";
  else if (yy == 1)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
}
int32_t main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
