#!/bin/perl
use POSIX;
use FileHandle;
use integer;
autoflush STDOUT 1;

$maxbound1 = -1000;
$maxbound2 = -1000;
$maxbound3 = -1000;
$maxbound4 = -1000;

$minbound1 = 1000;
$minbound2 = 1000;
$minbound3 = 1000;
$minbound4 = 1000;
while (<>) {
  ($bound1, $bound2, $bound3, $bound4) = 
	/BBX\s+(-?\d+?)\s+(-?\d+?)\s+(-?\d+?)\s+(-?\d+?)\s/   
	or next;
  if ($bound1 > $maxbound1) {$maxbound1 = $bound1;}
  if ($bound2 > $maxbound2) {$maxbound2 = $bound2;}
  if ($bound3 > $maxbound3) {$maxbound3 = $bound3;}
  if ($bound4 > $maxbound4) {$maxbound4 = $bound4;}

  if ($bound1 < $minbound1) {$minbound1 = $bound1;}
  if ($bound2 < $minbound2) {$minbound2 = $bound2;}
  if ($bound3 < $minbound3) {$minbound3 = $bound3;}
  if ($bound4 < $minbound4) {$minbound4 = $bound4;}

#print "$bound1 $bound2 $bound3 $bound4\n";
}
print "Min:$minbound1 $minbound2 $minbound3 $minbound4\n";
print "Max:$maxbound1 $maxbound2 $maxbound3 $maxbound4\n";
