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

namespace ConsoleApplication75
{
    class Program
    {
        static void Main(string[] args)
        {
            string line = Console.ReadLine();
            string[] numbers = line.Split(' ');
            int n = int.Parse(numbers[0]);
            int m = int.Parse(numbers[1]);
            for (int i = 0; i < n; i++)
            {
                Console.ReadLine();
            }
            for (int j = 0; j < m; j++)
            {
                string linija = Console.ReadLine();
                string[] brojovi = line.Split(' ');
                int x = int.Parse(brojovi[0]);
                int y = int.Parse(brojovi[1]);
            }


        }

    }
}