#!/usr/bin/perl
use 5.016;
use warnings;
sub sign { $_[0] <=> 0 }
sub f
{ (length($_[0]) == length($_[1])) and (sign
($_[0]) == sign
($_[1])) }
foreach(
[110, 119],
[-110, -119],
[-110, 119],
[1234, 214],
[567, 23],
[567, -23]
){
say
join(',', @{$_}), ' -> ', (f
(@{$_}) ? 'T' : 'F');}
IyEvdXNyL2Jpbi9wZXJsCnVzZSA1LjAxNjsKdXNlIHdhcm5pbmdzOwoKc3ViIHNpZ24geyAkX1swXSA8PT4gMCB9CgpzdWIgZiB7IChsZW5ndGgoJF9bMF0pID09IGxlbmd0aCgkX1sxXSkpIGFuZCAoc2lnbigkX1swXSkgPT0gc2lnbigkX1sxXSkpIH0KCmZvcmVhY2goCglbMTEwLCAxMTldLAoJWy0xMTAsIC0xMTldLAoJWy0xMTAsIDExOV0sCglbMTIzNCwgMjE0XSwKCVs1NjcsIDIzXSwKCVs1NjcsIC0yM10KKXsKCXNheSBqb2luKCcsJywgQHskX30pLCAnIC0+ICcsIChmKEB7JF99KSA/ICdUJyA6ICdGJyk7Cn0K