stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

	int x;

	cin >> x;



	if (x < 1200) {

		cout << "ABC";

	}

	else {

		cout << "ARC";

	}

}

// Faster C++ solution for the same problem (measured speedup: 5.304907621289725x):
#include<stdio.h>

int main()

{

	int input;

	scanf("%d",&input);

	if(input<1200){

		printf("ABC\n");

	}

	else{

		printf("ARC\n");

	}

	return 0;

}
// Slower C++ solution:
#include <stdio.h>

#include <math.h>

#include <string.h>

#include <algorithm>

#include <iostream>

#include <string>

#include <time.h>

#include <queue>

#include <list>

#include <string.h>

#define sf scanf

#define pf printf

#define lf double

#define ll long long

#define p123 printf("123\n");

#define pn printf("\n");

#define pk printf(" ");

#define p(n) printf("%d",n);

#define pln(n) printf("%d\n",n);

#define s(n) scanf("%d",&n);

#define ss(n) scanf("%s",n);

#define ps(n) printf("%s",n);

#define sld(n) scanf("%lld",&n);

#define pld(n) printf("%lld",n);

#define slf(n) scanf("%lf",&n);

#define plf(n) printf("%lf",n);

#define sc(n) scanf("%c",&n);

#define pc(n) printf("%c",n);

#define gc getchar();

#define re(n,a) memset(n,a,sizeof(n));

#define len(a) strlen(a)

#define LL long long

#define eps 1e-6

using namespace std;

const double pi = 3.1415926535;

/*

https://codeforces.com/contest/1106/problems

https://codeforces.com/contest/1106/submit

*/



int main() {

    int n ;

    s(n)

    if(n < 1200){

        puts("ABC");

        

    }else {

        puts("ARC");

        }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.246303730798099x):
#include<stdio.h>

int main()

{

	int input;

	scanf("%d",&input);

	if(input<1200){

		printf("ABC\n");

	}

	else{

		printf("ARC\n");

	}

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int  main(){

    int x;

    cin>>x;

    x>=1200?cout<<"ARC"<<endl:cout<<"ABC"<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.316451897616179x):
#include<stdio.h>

int main()

{

	int input;

	scanf("%d",&input);

	if(input<1200){

		printf("ABC\n");

	}

	else{

		printf("ARC\n");

	}

	return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

    int x;

    cin >> x;



    if (x < 1200){

        cout << "ABC" << endl;

    }else{

        cout << "ARC" << endl;

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.3162108516029605x):
#include<stdio.h>



int main()

{

	int a;

	scanf("%d",&a);

	

	if(a<1200)

		printf("ABC\n");

	else if(a>=1200)

		printf("ARC\n");

	

	

	

	return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

	int x;

	cin >> x;



	if (x < 1200) {

		cout << "ABC";

	}

	else {

		cout << "ARC";

	}

}

// Faster C++ solution for the same problem (measured speedup: 5.304907621289725x):
#include<stdio.h>



int main()

{

	int a;

	scanf("%d",&a);

	

	if(a<1200)

		printf("ABC\n");

	else if(a>=1200)

		printf("ARC\n");

	

	

	

	return 0;

}
// Slower C++ solution:
#include <stdio.h>

#include <math.h>

#include <string.h>

#include <algorithm>

#include <iostream>

#include <string>

#include <time.h>

#include <queue>

#include <list>

#include <string.h>

#define sf scanf

#define pf printf

#define lf double

#define ll long long

#define p123 printf("123\n");

#define pn printf("\n");

#define pk printf(" ");

#define p(n) printf("%d",n);

#define pln(n) printf("%d\n",n);

#define s(n) scanf("%d",&n);

#define ss(n) scanf("%s",n);

#define ps(n) printf("%s",n);

#define sld(n) scanf("%lld",&n);

#define pld(n) printf("%lld",n);

#define slf(n) scanf("%lf",&n);

#define plf(n) printf("%lf",n);

#define sc(n) scanf("%c",&n);

#define pc(n) printf("%c",n);

#define gc getchar();

#define re(n,a) memset(n,a,sizeof(n));

#define len(a) strlen(a)

#define LL long long

#define eps 1e-6

using namespace std;

const double pi = 3.1415926535;

/*

https://codeforces.com/contest/1106/problems

https://codeforces.com/contest/1106/submit

*/



int main() {

    int n ;

    s(n)

    if(n < 1200){

        puts("ABC");

        

    }else {

        puts("ARC");

        }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.246303730798099x):
#include<stdio.h>



int main()

{

	int a;

	scanf("%d",&a);

	

	if(a<1200)

		printf("ABC\n");

	else if(a>=1200)

		printf("ARC\n");

	

	

	

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int  main(){

    int x;

    cin>>x;

    x>=1200?cout<<"ARC"<<endl:cout<<"ABC"<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.316451897616179x):
#include<stdio.h>



int main()

{

	int a;

	scanf("%d",&a);

	

	if(a<1200)

		printf("ABC\n");

	else if(a>=1200)

		printf("ARC\n");

	

	

	

	return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

    int x;

    cin >> x;



    if (x < 1200){

        cout << "ABC" << endl;

    }else{

        cout << "ARC" << endl;

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.3162108516029605x):
#include<stdio.h>



int main(){

    int n;

    scanf("%d",&n);

    if (n<1200) printf("ABC\n");

    else printf("ARC\n");



    return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

	int x;

	cin >> x;



	if (x < 1200) {

		cout << "ABC";

	}

	else {

		cout << "ARC";

	}

}

// Faster C++ solution for the same problem (measured speedup: 5.304907621289725x):
#include<stdio.h>



int main(){

    int n;

    scanf("%d",&n);

    if (n<1200) printf("ABC\n");

    else printf("ARC\n");



    return 0;

}
// Slower C++ solution:
#include <stdio.h>

#include <math.h>

#include <string.h>

#include <algorithm>

#include <iostream>

#include <string>

#include <time.h>

#include <queue>

#include <list>

#include <string.h>

#define sf scanf

#define pf printf

#define lf double

#define ll long long

#define p123 printf("123\n");

#define pn printf("\n");

#define pk printf(" ");

#define p(n) printf("%d",n);

#define pln(n) printf("%d\n",n);

#define s(n) scanf("%d",&n);

#define ss(n) scanf("%s",n);

#define ps(n) printf("%s",n);

#define sld(n) scanf("%lld",&n);

#define pld(n) printf("%lld",n);

#define slf(n) scanf("%lf",&n);

#define plf(n) printf("%lf",n);

#define sc(n) scanf("%c",&n);

#define pc(n) printf("%c",n);

#define gc getchar();

#define re(n,a) memset(n,a,sizeof(n));

#define len(a) strlen(a)

#define LL long long

#define eps 1e-6

using namespace std;

const double pi = 3.1415926535;

/*

https://codeforces.com/contest/1106/problems

https://codeforces.com/contest/1106/submit

*/



int main() {

    int n ;

    s(n)

    if(n < 1200){

        puts("ABC");

        

    }else {

        puts("ARC");

        }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.246303730798099x):
#include<stdio.h>



int main(){

    int n;

    scanf("%d",&n);

    if (n<1200) printf("ABC\n");

    else printf("ARC\n");



    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int  main(){

    int x;

    cin>>x;

    x>=1200?cout<<"ARC"<<endl:cout<<"ABC"<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.316451897616179x):
#include<stdio.h>



int main(){

    int n;

    scanf("%d",&n);

    if (n<1200) printf("ABC\n");

    else printf("ARC\n");



    return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

    int x;

    cin >> x;



    if (x < 1200){

        cout << "ABC" << endl;

    }else{

        cout << "ARC" << endl;

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.3162108516029605x):
#include <stdio.h>



int main(){

	int x;

	scanf("%d",&x);

	if(x < 1200){

		printf("ABC\n");

	}

	else{

		printf("ARC\n");

	}

	return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

	int x;

	cin >> x;



	if (x < 1200) {

		cout << "ABC";

	}

	else {

		cout << "ARC";

	}

}

// Faster C++ solution for the same problem (measured speedup: 5.304907621289725x):
#include <stdio.h>



int main(){

	int x;

	scanf("%d",&x);

	if(x < 1200){

		printf("ABC\n");

	}

	else{

		printf("ARC\n");

	}

	return 0;

}
// Slower C++ solution:
#include <stdio.h>

#include <math.h>

#include <string.h>

#include <algorithm>

#include <iostream>

#include <string>

#include <time.h>

#include <queue>

#include <list>

#include <string.h>

#define sf scanf

#define pf printf

#define lf double

#define ll long long

#define p123 printf("123\n");

#define pn printf("\n");

#define pk printf(" ");

#define p(n) printf("%d",n);

#define pln(n) printf("%d\n",n);

#define s(n) scanf("%d",&n);

#define ss(n) scanf("%s",n);

#define ps(n) printf("%s",n);

#define sld(n) scanf("%lld",&n);

#define pld(n) printf("%lld",n);

#define slf(n) scanf("%lf",&n);

#define plf(n) printf("%lf",n);

#define sc(n) scanf("%c",&n);

#define pc(n) printf("%c",n);

#define gc getchar();

#define re(n,a) memset(n,a,sizeof(n));

#define len(a) strlen(a)

#define LL long long

#define eps 1e-6

using namespace std;

const double pi = 3.1415926535;

/*

https://codeforces.com/contest/1106/problems

https://codeforces.com/contest/1106/submit

*/



int main() {

    int n ;

    s(n)

    if(n < 1200){

        puts("ABC");

        

    }else {

        puts("ARC");

        }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.246303730798099x):
#include <stdio.h>



int main(){

	int x;

	scanf("%d",&x);

	if(x < 1200){

		printf("ABC\n");

	}

	else{

		printf("ARC\n");

	}

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int  main(){

    int x;

    cin>>x;

    x>=1200?cout<<"ARC"<<endl:cout<<"ABC"<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.316451897616179x):
#include <stdio.h>



int main(){

	int x;

	scanf("%d",&x);

	if(x < 1200){

		printf("ABC\n");

	}

	else{

		printf("ARC\n");

	}

	return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

    int x;

    cin >> x;



    if (x < 1200){

        cout << "ABC" << endl;

    }else{

        cout << "ARC" << endl;

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.3162108516029605x):
#include<stdio.h>

int main()

{

   int m;

   scanf("%d",&m);





   if(m < 1200)

   {

       printf("ABC\n");



   }



   else printf("ARC\n");



    return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

	int x;

	cin >> x;



	if (x < 1200) {

		cout << "ABC";

	}

	else {

		cout << "ARC";

	}

}

// Faster C++ solution for the same problem (measured speedup: 5.304907621289725x):
#include<stdio.h>

int main()

{

   int m;

   scanf("%d",&m);





   if(m < 1200)

   {

       printf("ABC\n");



   }



   else printf("ARC\n");



    return 0;

}
// Slower C++ solution:
#include <stdio.h>

#include <math.h>

#include <string.h>

#include <algorithm>

#include <iostream>

#include <string>

#include <time.h>

#include <queue>

#include <list>

#include <string.h>

#define sf scanf

#define pf printf

#define lf double

#define ll long long

#define p123 printf("123\n");

#define pn printf("\n");

#define pk printf(" ");

#define p(n) printf("%d",n);

#define pln(n) printf("%d\n",n);

#define s(n) scanf("%d",&n);

#define ss(n) scanf("%s",n);

#define ps(n) printf("%s",n);

#define sld(n) scanf("%lld",&n);

#define pld(n) printf("%lld",n);

#define slf(n) scanf("%lf",&n);

#define plf(n) printf("%lf",n);

#define sc(n) scanf("%c",&n);

#define pc(n) printf("%c",n);

#define gc getchar();

#define re(n,a) memset(n,a,sizeof(n));

#define len(a) strlen(a)

#define LL long long

#define eps 1e-6

using namespace std;

const double pi = 3.1415926535;

/*

https://codeforces.com/contest/1106/problems

https://codeforces.com/contest/1106/submit

*/



int main() {

    int n ;

    s(n)

    if(n < 1200){

        puts("ABC");

        

    }else {

        puts("ARC");

        }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.246303730798099x):
#include<stdio.h>

int main()

{

   int m;

   scanf("%d",&m);





   if(m < 1200)

   {

       printf("ABC\n");



   }



   else printf("ARC\n");



    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int  main(){

    int x;

    cin>>x;

    x>=1200?cout<<"ARC"<<endl:cout<<"ABC"<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.316451897616179x):
#include<stdio.h>

int main()

{

   int m;

   scanf("%d",&m);





   if(m < 1200)

   {

       printf("ABC\n");



   }



   else printf("ARC\n");



    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int x;

    cin>>x;

    if(x<1200){

        cout<<"ABC"<<endl;

    }

    else cout<<"ARC"<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.3162108516029605x):
#include<stdio.h>

int main()

{

   int m;

   scanf("%d",&m);





   if(m < 1200)

   {

       printf("ABC\n");



   }



   else printf("ARC\n");



    return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main(void){

    // Here your code !

    int a;

    cin >> a;

    cout << ((a>=1200)?"ARC":"ABC") << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.339078140965462x):
#include <stdio.h>

int main(void){

    int a;

    scanf("%d",&a);

    puts((a>=1200)?"ARC":"ABC");

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int n;

    cin>>n;

        if(n<1200)

        cout<<"ABC";

		

        else cout<<"ARC";

    

}

// Faster C++ solution for the same problem (measured speedup: 5.303816384364003x):
#include<stdio.h>



int main(){

	int n;

	scanf("%d", &n);

	if(n<1200) printf("ABC\n");

	else printf("ARC\n");

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main(){

	long long n,i,sum=0,a,left=0;

	cin>>n;

	for(i=0;i<n;i++)

	{

		cin>>a;

		sum+=(left+a)/2;

		left=(left+a)%2;

		if(!a)

			left=0;

	}

	cout<<sum<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.320240701257329x):
#include <cstdio>

#include <algorithm>

#include <cstring>

#include <cctype>

typedef long long int64;

using namespace std;

inline int read(int f = 1, int x = 0, char ch = ' ')

{

    while(!isdigit(ch = getchar())) if(ch == '-') f = -1;

    while(isdigit(ch)) x = x*10+ch-'0', ch = getchar();

    return f*x;

}

const int N = 1e5+5;

int n, a[N];

int64 ans;

int main()

{

    n = read(); 

    for(int i = 1; i <= n; ++i) a[i] = read();

    for(int i = 1; i <= n; ++i)

    {

        ans += a[i]>>1, a[i] &= 1;

        if(a[i]&&a[i+1]) --a[i], --a[i+1], ++ans;

    }

    printf("%lld\n", ans);

    return 0;

}
// Slower C++ solution:
#include<algorithm>

#include<iostream>

#include<cstring>

#include<cstdio>

#include<cmath>

#define MXN 100010

#define LLI long long



int n,

	a[MXN];

LLI ans;





int main(){

	

	scanf("%d",&n);

	for(int i=1;i<=n;i++){

		scanf("%d",&a[i]);

		if((a[i-1]+a[i])&1){

			ans+=(a[i-1]+a[i])>>1;

			if(a[i])

				a[i]=1;

		}

		else{

			ans+=(a[i-1]+a[i])>>1;

			a[i]=0;

		}

	}

	printf("%lld\n",ans);

	//system("pause");

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.293467330402186x):
#include<cstdio>

#include<string>

#define min(a,b) ((a)<(b)?(a):(b))

#define MAXN 100005

using namespace std;

inline int read(){

	register int x=0;

	register bool f=1;

	register char ch=getchar();

	while(!isdigit(ch)){

		if(ch=='-') f=0;

		ch=getchar();

	}

	while(isdigit(ch)){

		x=(x<<1)+(x<<3)+(ch-'0');

		ch=getchar();

	}

	return f?x:-x;

}

long long A[MAXN],N,ans,sum;

int main(){

	N=read();

	for(int i=1;i<=N;i++) A[i]=read();

	for(int i=1;i<=N;i++){

		sum+=A[i];

		if(!A[i]||sum%2==0){

			ans+=(sum/2);

			sum=0;

		}

	}

	ans+=(sum/2);

	printf("%lld\n",ans);

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>



using namespace std;



typedef long long ll;

const int Maxn = 100010;

int n;

int a[Maxn];



int main() {

	

	scanf("%d",&n);

	for(register int i=1; i<=n; i++)

		scanf("%d",&a[i]);

	

	register ll ans = 0;

	for(register int i=1; i<n; i++) {

		register int tmp = a[i] >> 1ll;

		a[i] -= tmp << 1ll;

		ans += tmp;

		tmp = min(a[i],a[i+1]);

		a[i] -= tmp;

		a[i+1] -= tmp;

		ans += tmp;

	}

	

	ans += a[n] >> 1ll;

	printf("%lld\n",ans);

	

	return 0;

	

}

// Faster C++ solution for the same problem (measured speedup: 5.206298143038124x):
#include<cstdio>

#include<cstring>

#include<algorithm>

#include<cmath>

#define inf 20021225

#define ll long long

#define mxn 100010

using namespace std;



ll a[mxn],n;



int main()

{

	scanf("%lld",&n);ll ans=0;

	for(int i=1;i<=n;i++)	scanf("%lld",&a[i]);

	for(int i=1;i<=n;i++)

	{

		ll cnt=a[i];

		while(i<n && a[i+1]!=0)	cnt+=a[i+1],i++;

		ans+=cnt/2;

	}

	printf("%lld\n",ans);

	return 0;

}
// Slower C++ solution:
/*

Character Drawing Adapted from FAKEUPDATE.NET

		   _    _____         _

		   \`,""   ,'7"r-..__/ \

		  ,'\ `, ,',','    _/   \

		 /   \, 7 / /     (   \ |

		J     \/ j  L______\  / |

		L   __JF"""/""\"\_,    /

		L,-"| O|  f O |  L_  _/

		F   \_ /  \__/   `-  j|

			.-'    `"""    ,' |          _..====.._

			\__/         r"_  A        ,' _..---.._`,

			 `-.______,,-L// / \  ___,' ,'_..:::.. `,`,

					  j   / / / 7"    `-<""=:'  '':. \ \

					 /   <,' /  F  . i , \   `,    :T W I

					 |    \,'  /    >X<  |     \   :| | L

					 |     `._/    ' ! ` |      I  :| |  G

					  \           \     /       |  :H T  |

					 __>-.__   __,-\   |        |  S P   |

					/     /|   | \  \  \_       | 'A R   |

				   /   __/ |   |  L  L   \      K./ /    L

				  /   |    |   4  I  I    |    E./ /   ,'

				 J    \    I    L F  I    |    // / _,'

		_________|     |   F    |J   F    |   //_/-'

		\   __   |    /   J     |/  J     |  /="

		\\  \_\  \__,' \  F     |   F     |

		\\\_____________\/      F__/      F

		 \\| 计算机编程 |_____/  (______/

		  \/从入门到入土/

*/

#include <iostream>

#include <cstdlib>

#include <iomanip>

#include <cmath>

#include <string>

#include <cstring>

#include <algorithm>

#include <vector>

#include <sstream>

#include <set>

#include <queue>

#include <stack>

#include <cctype>

#include <map>

#include <climits>

#include <bitset>

#include <functional>

using namespace std;

#define MATH_PI 3.14159265358979323846

int main(){

	ios::sync_with_stdio(false);

	long long N, ans = 0, tmp = 0, i, a;

	cin >> N;

	for (i = 0; i<N; ++i){

		cin >> a;

		tmp += a;

		if (a == 0 || i == N - 1){

			ans += tmp / 2;

			tmp = 0;

		}

	}

	cout << ans << endl;

endapp:

	//system("pause > nul");

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.290162004976232x):
#include<cstdio>

#include<cstring>

#include<algorithm>

#include<cmath>

#define inf 20021225

#define ll long long

#define mxn 100010

using namespace std;



ll a[mxn],n;



int main()

{

	scanf("%lld",&n);ll ans=0;

	for(int i=1;i<=n;i++)	scanf("%lld",&a[i]);

	for(int i=1;i<=n;i++)

	{

		ll cnt=a[i];

		while(i<n && a[i+1]!=0)	cnt+=a[i+1],i++;

		ans+=cnt/2;

	}

	printf("%lld\n",ans);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

#define gi(x) ((x) = F())

int F(){

	char ch;

	int x, a;

	while (ch = getchar(), (ch < '0' || ch > '9') && ch != '-');

	if (ch == '-') ch = getchar(), a = -1;

	else a = 1;

	x = ch - '0';

	while (ch = getchar(), ch >= '0' && ch <= '9') x = (x << 1) + (x << 3) + ch - '0';

	return a * x;

}

int n, a[100010];

long long ans;

int main(){

	gi(n);

	for (int i = 1; i <= n; ++i) gi(a[i]);

	for (int i = 1; i <= n; ++i) if (a[i] & 1) if (a[i + 1]) ++ans, --a[i], --a[i + 1];

	for (int i = 1; i <= n; ++i) ans += a[i] >> 1;

	printf("%lld\n", ans);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.142189181809143x):
#include "cstdio"

int a[100005],i,n;long long s;

int main(){

	scanf("%d",&n);

	for(i=1;i<=n;i++)scanf("%d",&a[i]);

	for(i=1;i<=n;i++){

		if(!a[i])continue;

		s+=a[i]>>1;

		a[i]&=1;

		if(a[i])if(a[i+1])a[i]--,a[i+1]--,s++;

	}

	printf("%lld\n",s);

}
// Slower C++ solution:
#include<iostream>

#include<cstdio>

#include<cstdlib>

#include<algorithm>

#include<vector>

#include<queue>

using namespace std;

const int N=2005;

vector<int> ad[N],ap[N];

priority_queue<int> pq;

int a[N],ans[N],vis[N],tail[N];

int n,v,cnt;

void dfs(int x){

	vis[x]=1;

	for(int i=0;i<ad[x].size();i++){

		v=ad[x][i];

		if(vis[v])continue;

		tail[v]=1;ap[x].push_back(v);

		dfs(v);

	}

}

int main(){

	cin>>n;

	for(int i=1;i<=n;i++)cin>>a[i];

	sort(a+1,a+n+1);

	for(int i=1;i<=n;i++)for(int j=1;j<=n;j++)

	if(__gcd(a[i],a[j])>1&&i!=j)ad[i].push_back(j);

	for(int i=1;i<=n;i++)if(vis[i]==0)dfs(i);

	for(int i=1;i<=n;i++)if(tail[i]==0)pq.push(i);

	while(pq.size()>0){

		v=pq.top();

		cnt++;ans[cnt]=a[v];

		pq.pop();

		for(int i=0;i<ap[v].size();i++)

		pq.push(ap[v][i]);

	}

	for(int i=1;i<=cnt;i++)cout<<ans[i]<<" ";

	cout<<endl;

	return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 1.1275502410696367x):
#include<cstdio>

#include<algorithm>

#include<queue>

#include<vector>

using namespace std;

const int N=2333;

int a[N];

int g[N][N];

int n;

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

struct sumireko{int to,ne;}e[N*1000];

int he[N],ecnt;

void addline(int f,int t)

{

	e[++ecnt].to=t;

	e[ecnt].ne=he[f];

	he[f]=ecnt;

}



bool vv[N];

int bi;

int sp[N];

vector<int> to[N];

void dfs(int x)

{

	vv[x]=1;

	for(int i=he[x],t;i;i=e[i].ne)

	{

		t=e[i].to;

		if(!vv[t])

		{

			to[x].push_back(t);

			dfs(t);

		}

	}

}



priority_queue<int> q;



int main()

{

	scanf("%d",&n);

	for(int i=1;i<=n;i++) scanf("%d",&a[i]);

	sort(a+1,a+1+n);

	for(int i=n;i;i--)

		for(int j=i-1;j;j--)

			if(gcd(a[i],a[j])!=1)

				addline(i,j),addline(j,i)/*,printf("line %d %d\n",i,j)*/;

	for(int i=1;i<=n;i++) if(!vv[i])

	{

		bi++;

		sp[bi]=i;

		dfs(i);

	}

	/*printf("%d\n",bi);

	for(int i=1;i<=bi;i++) printf("%d ",sp[i]);

	puts("\n----------------------------------");

	for(int i=1;i<=n;i++)

	{

		printf("%d:",i);

		for(int j=0;j<to[i].size();j++) printf("%d ",to[i][j]);

		putchar('\n');

	}

	puts("\n----------------------------------");*/

	for(int i=1;i<=bi;i++)

		q.push(sp[i]);

	while(!q.empty())

	{

		int g=q.top();

		q.pop();

		printf("%d ",a[g]);

		for(int i=0;i<to[g].size();i++) q.push(to[g][i]);

	}

	return 0;

}