#include <stdio.h>
int main(void){
    int N, i, j, total;
    int A[1000000000000000000];
    
    scanf("%d", &N);
    total = 0;
    for(i = 0; i < N; i++){
        scanf("%d", &A[i]);
    }
    
    for(i = 0; i < N; i++){
        for(j = 0; j < i; j++){
            total = A[i] * A[j];
            if(total < 1000000000000000000){
                printf("%d\n", total);
            } else {
                printf("-1");
            }
            
        }
    }
    
}
