gets a,b,c,d=%w(N S E W).map{|c|$_.count c} p Math.hypot a-b,c-d