Driver code
public static void main ( String [ ] args ) { int A = 5643 , B = 81 ; int D [ ] = { 3 , 8 , 1 } ; int N = D . length ; if ( reduceNtoX ( A , B , D , N ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }