Condition 1 for reaching the circumference
if ( Math . max ( Math . max ( cntl , cntr ) , Math . max ( cntu , cntd ) ) >= R ) return " Yes " ; HashMap < Integer , Integer > mp = new HashMap < > ( ) ; int r_square = R * R ; for ( int i = 1 ; i * i <= r_square ; i ++ ) {