#include <bits/stdc++.h>
using namespace std;
const long long int M = 1000000007;
vector<long long int> primefactors, fact;
bool isPowerTwo(long long int x) { return (x && !(x & (x - 1))); }
long long int modadd(long long int a, long long int b) {
  return ((a % M) + (b % M) + M) % M;
}
long long int modsub(long long int a, long long int b) {
  return ((a % M) - (b % M) + M) % M;
}
long long int modmul(long long int a, long long int b) {
  return ((a % M) * (b % M)) % M;
}
void generateFactorial(long long int n) {
  fact[0] = 1;
  for (long long int i = 1; i <= n; i++) fact[i] = (i * 1ll * fact[i - 1]) % M;
}
bool isPrime(long long int n) {
  if (n < 2) return false;
  for (long long int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
long long int power(long long int a, long long int b) {
  long long int res = 1;
  while (b) {
    if (b & 1) res = (res * a) % M;
    a = (a * a) % M;
    b >>= 1;
  }
  return res;
}
long long int modi(long long int a) {
  long long int m = M, s = 1, p = 0;
  while (a > 1) {
    long long int q = a / m, t = m;
    m = a % m;
    a = t;
    t = p;
    p = s - q * p;
    s = t;
  }
  return s >= 0 ? s : s + M;
}
void generatePrimeFactors(long long int n) {
  primefactors.clear();
  for (long long int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      primefactors.push_back(i);
      while (n % i == 0) n = n / i;
    }
  }
  if (n != 1) primefactors.push_back(n);
}
long long int ncr(long long int n, long long int r) {
  if (r == 0) return 1;
  fact[0] = 1;
  for (int i = 1; i <= n; i++) fact[i] = fact[i - 1] * i % M;
  return (fact[n] * modi(fact[r]) % M * modi(fact[n - r]) % M) % M;
}
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int findGCD(vector<long long int> &arr, int n) {
  int result = arr[0];
  for (int i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long int tc = 1;
  while (tc--) {
    long long int i, j, n, m;
    cin >> n;
    vector<long long int> a(n);
    long long int jhanda = 0;
    long long int maxi = INT_MIN;
    for (i = 0; i < n; i++) {
      cin >> a[i];
      maxi = max(maxi, a[i]);
    }
    if (findGCD(a, n) == 1) jhanda = 1;
    vector<long long int> factors(1000006, 0);
    for (i = n - 1; i >= 0; i--) {
      long long int flag = 1;
      for (long long int j = 2; j * j <= a[i]; j++) {
        if (a[i] % j == 0) {
          factors[j]++;
          if (factors[j] > 1) {
            flag = 0;
            break;
          }
          if (a[i] / j != j) {
            factors[a[i] / j]++;
            if (factors[a[i] / j] > 1) {
              flag = 0;
              break;
            }
          }
        }
      }
      if (flag == 0) {
        if (jhanda == 1)
          cout << "setwise coprime";
        else
          cout << "not coprime";
        return 0;
      }
    }
    cout << "pairwise coprime";
  }
  return 0;
}
