#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
bool allprime[1000001] = {0};
vector<int> sieve_of_primes_upto_10e6() {
  int n = 1000007;
  vector<int> set_of_primes;
  set_of_primes.push_back(2);
  int p;
  for (p = 3; p * p <= n; p += 2) {
    if (allprime[p] == 0) {
      set_of_primes.push_back(p);
      for (int i = p * p; i <= n; i += p) {
        allprime[i] = 1;
      }
    }
  }
  for (p; p <= n; p += 2) {
    if (allprime[p] == 0) {
      set_of_primes.push_back(p);
    }
  }
  return set_of_primes;
}
void solve1();
void solve() {
  int T;
  cin >> T;
  for (int z = 1; z <= T; z++) {
    solve1();
  }
}
signed main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve1();
  return 0;
}
int vis[1000007] = {0};
void solve1() {
  int n;
  cin >> n;
  int arr[n];
  cin >> arr[0];
  int c = arr[0];
  for (int i = 1; i < n; i++) {
    cin >> arr[i];
    c = gcd(c, arr[i]);
  }
  if (c > 1) {
    cout << "not coprime"
         << "\n";
    return;
  }
  vector<int> vec = sieve_of_primes_upto_10e6();
  for (int i = 0; i < n; i++) {
    if (arr[i] != 1 && vis[arr[i]] > 0) {
      cout << "setwise coprime"
           << "\n";
      return;
    }
    int j = 0;
    while (arr[i] >= vec[j] * vec[j]) {
      if (vis[vec[j]] == 0) {
        while (arr[i] % vec[j] == 0) {
          arr[i] /= vec[j];
          vis[vec[j]]++;
        }
      } else if (arr[i] % vec[j] == 0) {
        cout << "setwise coprime"
             << "\n";
        return;
      }
      j++;
    }
    if (vis[arr[i]] == 0)
      vis[arr[i]]++;
    else if (arr[i] != 1) {
      cout << "setwise coprime"
           << "\n";
      return;
    }
  }
  cout << "pairwise coprime"
       << "\n";
}
