Driver Code
public static void main ( String [ ] args ) { String number = "31462708" ; int l = number . length ( ) ; if ( solve ( number , l ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }