#include <bits/stdc++.h>
using namespace std;

vector<int> arr[1000005];
void primeFac(int num)
{
	int i = 2, count = 0;
	const int temp = num;
	
	while(i * i <= temp)
	{
		if(num % i == 0)
		{
			num /= i;
			count++;
		}
		
		else
		{
			if(count > 0)
				arr[i].push_back(count);
				
			count = 0;
			i++;
		}
	}
	
	if(num > 1)
		arr[num].push_back(1);
}

bool isPairwise()
{
	for(int i = 2; i < 1000005; i++)
	{
		if( (int)(arr[i].size()) >= 2)
			return false;
	}
	
	return true;
}

int main()
{
	int N;
	scanf("%d", &N);
	
	int GCD = -1;
	for(int i = 1; i <= N; i++)
	{
		int num;
		scanf("%d", &num);
		primeFac(num);
		
		if(GCD == -1)
			GCD = num;
			
		else
			GCD = __gcd(GCD, num);
	}
	
	if(isPairwise())
		printf("pairwise coprime");
		
	else if(GCD == 1)
		printf("setwise coprime");
		
	else
		printf("not coprime");
}
