Language: C++

#include<stdio.h>
#include<math.h>
#include<map>
using namespace std;
int gcd(int m,int n)
{
	int rem;
	while(n>0)
	{
		rem = m%n;
		m = n;
		n = rem;
	}
	return m;
}
int main()
{
	int n,i,b[40000],j;
	while(scanf("%d",&n)!=EOF&&n)
	{
		map<__int64,int> mp;
		for(i=0;i<n*(n+1)/2;i++)
		{
			scanf("%d",&b[i]);
		}
		for(i=0;i<n*(n+1)/2;i++)
		{
			for(j=i+1;j<n*(n+1)/2;j++)
			{
				int temp=gcd(b[i],b[j]);
				if(temp==1)
					continue;
				if(mp[temp] == 1)
					continue;
				else mp[temp] = 1;
			}
		}
		map<__int64,int>::iterator it;
		for(it = mp.begin();it!=mp.end();++it)
		{
			if(it->first%2==0)
				printf("%d\n",it->first);
		}
		int w=0;
		for(it = mp.begin();it!=mp.end();++it)
		{
			if(it->first%2==0)
				continue;
			if(w!=0)printf(" ");
			printf("%d",it->first);
			w++;
		}
		puts("");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:21: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
   21 |                 map<__int64,int> mp;
      |                     ^~~~~~~
      |                     __ynf64
a.cc:21:32: error: template argument 1 is invalid
   21 |                 map<__int64,int> mp;
      |                                ^
a.cc:21:32: error: template argument 3 is invalid
a.cc:21:32: error: template argument 4 is invalid
a.cc:33:38: error: invalid types 'int[int]' for array subscript
   33 |                                 if(mp[temp] == 1)
      |                                      ^
a.cc:35:40: error: invalid types 'int[int]' for array subscript
   35 |                                 else mp[temp] = 1;
      |                                        ^
a.cc:38:32: error: template argument 3 is invalid
   38 |                 map<__int64,int>::iterator it;
      |                                ^
a.cc:38:32: error: template argument 4 is invalid
a.cc:38:44: error: expected initializer before 'it'
   38 |                 map<__int64,int>::iterator it;
      |                                            ^~
a.cc:39:21: error: 'it' was not declared in this scope; did you mean 'i'?
   39 |                 for(it = mp.begin();it!=mp.end();++it)
      |                     ^~
      |                     i
a.cc:39:29: error: request for member 'begin' in 'mp', which is of non-class type 'int'
   39 |                 for(it = mp.begin();it!=mp.end();++it)
      |                             ^~~~~
a.cc:39:44: error: request for member 'end' in 'mp', which is of non-class type 'int'
   39 |                 for(it = mp.begin();it!=mp.end();++it)
      |                                            ^~~
a.cc:45:21: error: 'it' was not declared in this scope; did you mean 'i'?
   45 |                 for(it = mp.begin();it!=mp.end();++it)
      |                     ^~
      |                     i
a.cc:45:29: error: request for member 'begin' in 'mp', which is of non-class type 'int'
   45 |                 for(it = mp.begin();it!=mp.end();++it)
      |                             ^~~~~
a.cc:45:44: error: request for member 'end' in 'mp', which is of non-class type 'int'
   45 |                 for(it = mp.begin();it!=mp.end();++it)
      |                                            ^~~