using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mateja_Radosavljevic
{
    internal class Program
    {
        struct Redovi
        {
            public int a;
            public int b;
        }
        struct Kolone
        {
            public int c;
            public int d;
        }
        static void popunjavanje(int[,] mat, int n, int a, Redovi[]x, Kolone[]y)
        {
            for (int i=0; i<n; i++)
            {
                if ()
            }
        }
        private static void Main(string[] args)
        {

            string[] ulaz = Console.ReadLine().Split(' ');           
            int N= int.Parse(ulaz[0]);
            int M= int.Parse(ulaz[1]);
            Redovi[] x= new Redovi[N];
            Kolone[] y = new Kolone[M];
            for (int i = 0;i< N; i++)
            {
                Console.ReadLine().Split(' ');
            }
            Console.ReadLine();
        }
    }
}