#include<iostream>
#include<vector>

using namespace std;

int gcd(int a, int b)
{
	int m = b % a;
	return m == 0 ? a : gcd(m, a);
}

using namespace std;

int main(void)
{
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  
  int n;
  cin >> n;
  
  vector<int> num, set;
  num.resize(n);
  set.resize(n);
  
  for (int i = 0; i < n; i++) cin >> num[i];

  set[0] = num[0];
  for (int i = 1; i < n; i++)
	set[i] = gcd(set[i-1], num[i]);

  bool pairw = true;
  for (int i = 1; i < n; i++)
    for (int j = 0; j < il j++)
      if (gcd(num[i], num[j]) != 1)
  	  {
  	  	pairw = false;
  	  	goto endfor;
  	  }
  endfor: 
  if (pairw)
	  cout << "pairwise coprime";
  else if (set[n-1] == 1)
	  cout << "setwise coprime";
  else
	  cout << "no coprime";
  
  return 0;
}
