Driver code
public static void Main ( String [ ] args ) { int [ ] a = { 2 , 7 , 8 , 10 , 15 } ; int [ ] b = { 1 , 6 , 7 , 8 } ; int [ ] c = { 4 , 5 , 5 } ; int l1 = a . Length ; int l2 = b . Length ; int l3 = c . Length ; int x = 14 ; if ( existsTriplet ( a , b , c , x , l1 , l2 , l3 ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }