public static void Main()
int[,] matrix = new int[8, 8];
for (int i = 0; i < 8; i++)
int n = int.Parse(Console.ReadLine());
for (int j = 7; j >= 0; j--)
for (int row = 0; row < 8; row++)
for (int col = 0; col < 8; col++)
if (matrix[row, col] == 1)
for (int col = 0; col < 8; col++)
for (int row = 0; row < 8; row++)
if (matrix[row, col] == 1)
bestLineCount = bestLineCount / 2;
Console.WriteLine(bestLine);
Console.WriteLine(bestLineCount);