/**
 * author: Behradm
 * Created: 2020.08.29 17:56:18
 * In The Name of God
**/
#include <bits/stdc++.h>

using namespace std;

const int N = 1e6 + 10;
int a[N], cnt[N];

int main() {   
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int gcd = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i == 0)
      gcd = a[0];
    else
      gcd = __gcd(gcd, a[i]);
  }

  bool bad = false;
  for (int i = 0; i < n; i++) {
		for (int j = 2; j * j <= a[i]; j++) {
			if (a[i] % j == 0) {
				cnt[j]++;
				if(a[i] / j != j)
					cnt[a[i] / j]++;
        if (cnt[j] > 1 || cnt[a[i] / j] > 1) {
          bad = true;
          break;
        }
			}
		}
    if (bad)
      break;
	}

  if (!bad) {
    cout << "pairwise coprime\n";
  } else if (gcd == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
  return 0;
}
