#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int findGCD(vector<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;
}
vector<int> least_dividing_prime(1000001 + 1, -1);
void sieve() {
  for (int i = 2; i <= 1000001; ++i) {
    if (least_dividing_prime[i] == -1) {
      least_dividing_prime[i] = i;
      for (int j = 2 * i; j <= 1000001; j += i) {
        if (least_dividing_prime[j] == -1) {
          least_dividing_prime[j] = i;
        }
      }
    }
  }
}
unordered_set<int> prime;
bool factor(int n) {
  int k = n, d;
  while (k != 1) {
    d = least_dividing_prime[n];
    if (prime.find(d) == prime.end()) {
      prime.insert(d);
    } else {
      return false;
    }
    k /= d;
  }
  return true;
}
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
  }
  sieve();
  bool ok = true;
  for (int i = 0; i < n; ++i) {
    if (!factor(v[i])) {
      ok = false;
      break;
    }
  }
  if (ok) {
    cout << "pairwise coprime\n";
  } else {
    if (findGCD(v, n) == 1) {
      cout << "setwise coprime\n";
    } else {
      cout << "not coprime\n";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  for (int i = 0; i < t; ++i) {
    solve();
  }
  return 0;
}
