#!/usr/bin/perl

open (BOUNDS,"<bounds.txt");

while (<BOUNDS>)
{
	chomp;
	$mapList[$maxMap] = [ split(/\t/) ];
	$maxMap++;
}

print "$maxMap maps loaded\n";

for ($i = 0; $i < $maxMap; $i++)
{
	if (($mapList[$i][5] >= $ARGV[0]) && ($ARGV[0] >= $mapList[$i][7])
	&& ($mapList[$i][6] >= $ARGV[1]) && ($ARGV[1] >= $mapList[$i][8]))
	{
		print "$mapList[$i][0] $mapList[$i][2]\n";
	}
}
