Driver code
public static void main ( String [ ] args ) throws java . lang . Exception { int arr [ ] = { 1 , 0 , 2 , 3 , 7 } ; int n = arr . length ; if ( validQuadruple ( arr , n ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }