sub check {
	my ($p1, $p2) = @_;
	if (($p1 =~ /\d+/) && ($p2 =~ /\d+/)) {
		if ($p1 == $p2) {
			print "\nSAME\n";
		}
		$sum = $p1 + $p2;
		print "Total = $sum\n";
		$mul = $p1 * $p2;
		print "Product = $mul\n";
	}
	elsif (($p1 =~ /\w+/) && ($p2 =~ /\w+/)) {
		if ($p1 eq $p2) {
			print "\nSAME\n";
		}
	}
}

print "Enter two numbers :- ";
chomp (@line = <stdin>);
&check (@line);	