using System;
public class Program
{
public static void Main()
int[,] pole = new int [2,3];
bool x=false;
int i = 0;
for (int j = 0; j < pole.GetLength(1); j++)
for ( i = 0; i < pole.GetLength(0); i++)
pole[i,j]=int.Parse(Console.ReadLine());
}
if(pole[j,i]==0)
x=true;
i++;
if(j==3)
Console.WriteLine(x);