Line passes through i , so it neither falls left nor right .
if ( sum_till . get ( i - 1 ) == total_sum - sum_till . get ( i ) ) partition_possible = 1 ; } System . out . printf ( partition_possible == 1 ? "YES " ▁ : ▁ " NO "); }