#! /bin/sh
#!perl -w # --*- Perl -*--
eval 'exec perl5 -x $0 ${1+"$@"}'
    if 0;
#---------------------------------------------------------------
#$Author: saulius $
#$Date: 2009-11-09 18:23:40 +0500 (Mon, 09 Nov 2009) $ 
#$Revision: 571 $
#$Id: euclid-gcd.pl 571 2009-11-09 13:23:40Z saulius $
#---------------------------------------------------------------
#*
#  Find GCD (Greatest Common Divider) using Euclid's algorithm.
#**

use strict;
use GCD;

while(<>) {
    my ($x,$y) = split;
    print GCD::gcd( $x, $y ), "\n";
}
