#include <stdio.h>

int main() {
    int quant, lam1=0, lam2=0;
    scanf("%d", &quant);
    int n[quant];
    for(int i=0; i<quant; i++){
        scanf("%d", &n[i]);
        if(n[i]==1){
            lam1=lam1+1;
        }
        else if(n[i]==2){
            lam2=lam2+1;
        }       
    }
    if((lam1+lam2)%2==0){
        printf("0");
    }
    else{
        printf("1");
    }
    if(lam2%2==0){
        printf("\n0");
    }
    else{
        printf("\n1");
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: