#include<cstdio>

using namespace std;

int a[100007];

int main(){
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        int aa;
        scanf("%d",&aa);
        a[aa]++;
    }
    int max1=0,max2=0;
    for(int i=100000;i>=1;i--){
        if(a[i]>=2){
            max1=i;
            a[i]-=2;
            break;
        }
    }
    for(int i=100000;i>=1;i--){
        if(a[i]>=2){
            max2=i;
            a[i]=0;
            break;
        }
    }
    if(max1*max2==0){
        printf("No rectangle can be formed.\n");
        return 0;
    }
    printf("%lld\n%d*%drectangle can be formed.\n",(long long)max1*max2,max2,max1);
    return 0;
}