Loop to find all left and right part of the string
for ( int i = 0 ; i < l - 1 ; i ++ ) { String left = s . Substring ( 0 , i + 1 ) ; String right = s . Substring ( i + 1 ) ; int x = int . Parse ( left ) ; int y = int . Parse ( right ) ; if ( ! isPrime ( x + y ) ) return false ; } return true ; }