C # program to check if any valid sequence is divisible by M
using System ; class GFG { static int MAX = 1000 ; static Boolean isPossible ( int n , int index , int sum , int M , int [ ] arr , int [ , ] dp ) {