#include <bits/stdc++.h>   using namespace std;   const int INF = 1E9 + 7;   template <class C>   void mini(C& a4, C b4) {     a4 = min(a4, b4);   }   template <class C>   void maxi(C& a4, C b4) {     a4 = max(a4, b4);   }   int n, k, a[57], dp[507][57][57], small, big, res;   bool is;   int dw[57][57];   int main() {     for (int n = 0; n < (57); ++n) {       dw[n][0] = 1;       for (int k = (1); k <= (n); ++k)         dw[n][k] = (dw[n - 1][k - 1] + dw[n - 1][k]) % INF;     }     ios_base::sync_with_stdio(false);     cout << setprecision(15) << fixed;     cin >> n >> k;     for (int i = 0; i < (n); ++i) cin >> a[i];     k /= 50;     for (int i = 0; i < (n); ++i) (a[i] == 100 ? big : small)++;     dp[0][0][0] = 1;     for (int f = 0; f < (500); ++f) {       for (int s = 0; s < (small + 1); ++s)         for (int b = 0; b < (big + 1); ++b)           if (dp[f][s][b]) {             if (s == small && b == big) {               cout << f << endl << dp[f][s][b] << endl;               return 0;             }             int sogr = (f & 1 ? s : small - s);             int bogr = (f & 1 ? b : big - b);             for (int ss = 0; ss < (sogr + 1); ++ss)               for (int bb = 0; bb < (bogr + 1); ++bb)                 if (ss + bb > 0 && ss + 2 * bb <= k) {                   int news = s + ss * (f & 1 ? -1 : 1);                   int newb = b + bb * (f & 1 ? -1 : 1);                   long long ile = dp[f][s][b];                   ile *= dw[sogr][ss];                   ile %= INF;                   ile *= dw[bogr][bb];                   ile %= INF;                   dp[f + 1][news][newb] += ile;                   dp[f + 1][news][newb] %= INF;                 }           }     }     cout << -1 << endl << 0 << endl;     return 0;   }   