#include <bits/stdc++.h>
using namespace std;
int nCrevenoroddfinder(int n, int r) {
  int a = r;
  int b = n - r;
  for (int i = 0; i < 30; i++) {
    int x = 1 << i;
    if ((x & a) && (x & b)) {
      return 0;
    }
  }
  return 1;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
bool isperfect(long long n) {
  long long y = sqrt(n);
  if (n % y == 0 && y * y == n) return true;
  return false;
}
bool comp(pair<int, int> a, pair<int, int> b) {
  if (a.first == b.first) return a.second > b.second;
  return a.first < b.first;
}
long long powi(long long a, long long b) {
  long long ans = 1;
  while (b > 0) {
    if (b & 1) ans = (ans * a);
    b = b >> 1;
    a = (a * a);
  }
  return ans;
}
bool isprime(long long n) {
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
bool prime[10000000];
void seive() {
  prime[1] = true;
  for (int i = 2; i * i < 10000000; i++) {
    if (prime[i]) continue;
    for (int j = i * i; j < 10000000; j += i) {
      prime[j] = true;
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long int> v(n);
  long long f;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    if (i == 0)
      f = v[i];
    else
      f = gcd(f, v[i]);
  }
  long long dp[n];
  long long cnt = 0;
  long long flag = 1;
  cnt = 0;
  for (int i = 0; i < n; i++) {
    long long d = -1;
    if (v[i] % 2 == 0)
      d = 2;
    else {
      for (int j = 3; j * j <= v[i]; j += 2) {
        if (v[i] % j == 0) {
          d = j;
          break;
        }
      }
      if (d == -1) d = v[i];
    }
    dp[i] = d;
  }
  map<long long, long long> make_pair;
  for (int i = n - 1; i >= 0; i--) {
    if (make_pair[dp[i]] != 0) {
      flag = 0;
      break;
    }
    make_pair[dp[i]]++;
  }
  if (flag == 1)
    cout << "pairwise coprime";
  else if (f == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
