while ( ) { chomp; my ( $first, $second ) = split; print "$first:$second --> ", multiple($first,$second) ? "yes" : "no", "\n"; } sub multiple { my ( $one, $two ) = @_; ! ( $one > $two ? $one % $two : $two % $one ); } __DATA__ 1 2 2 3 3 9 9 3 11 7 2 108 4 4