#include <bits/stdc++.h>
using namespace std;
long long fact[55], inverse[55], fact_inverse[55];
void precalc() {
  fact[0] = 1;
  inverse[0] = 1;
  inverse[1] = 1;
  fact_inverse[0] = 1;
  fact_inverse[1] = 1;
  for (long long i = 1; i < 55; i++) fact[i] = (i * fact[i - 1]) % 1000000007;
  for (long long i = 2; i < 55; i++) {
    inverse[i] = (1000000007 -
                  ((1000000007 / i) * inverse[1000000007 % i]) % 1000000007) %
                 1000000007;
    fact_inverse[i] = (inverse[i] * fact_inverse[i - 1]) % 1000000007;
  }
}
inline long long choose(long long n, long long r) {
  return (fact[n] * ((fact_inverse[r] * fact_inverse[n - r]) % 1000000007)) %
         1000000007;
}
int A, B, K;
pair<long long, long long> dp[51][51], unassigned = make_pair(-5, -5);
vector<pair<pair<int, int>, pair<int, int> > > moves[51][51];
pair<long long, long long> solve(int x, int y) {
  if ((x + 2 * y) <= K) {
    moves[x][y].push_back(make_pair(make_pair(x, y), make_pair(0, 0)));
    return make_pair(1, 1);
  }
  if (dp[x][y] != unassigned) {
    return dp[x][y];
  }
  int t = 1000000007;
  long long ways = 0;
  for (int a = 0; a <= x; a++) {
    for (int b = 0; b <= y; b++) {
      if (((a + 2 * b) <= K) && (a + b)) {
        int othera = A - x + a, otherb = B - y + b;
        for (int p = 0; p <= othera; p++) {
          for (int q = 0; q <= otherb; q++) {
            if ((p + 2 * q) <= K && (p + q)) {
              int nx = x - a + p, ny = y - b + q;
              if ((p + 2 * q) < (a + 2 * b)) {
                if (nx != x || ny != y) {
                  pair<long long, long long> w = solve(nx, ny);
                  if (w.first != -1) {
                    int tnew = w.first + 2;
                    if (tnew < t) {
                      t = tnew;
                      long long coff = choose(x, a) * choose(y, b) % 1000000007;
                      coff *=
                          (choose(othera, p) * choose(otherb, q) % 1000000007);
                      coff %= 1000000007;
                      coff = coff * w.second % 1000000007;
                      ways = coff;
                    } else if (tnew == t) {
                      long long coff = choose(x, a) * choose(y, b) % 1000000007;
                      coff *=
                          (choose(othera, p) * choose(otherb, q) % 1000000007);
                      coff %= 1000000007;
                      coff = coff * w.second % 1000000007;
                      ways += coff;
                      if (ways >= 1000000007) ways -= 1000000007;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (t == 1000000007) return dp[x][y] = make_pair(-1, 0);
  return dp[x][y] = make_pair(t, ways);
}
int main() {
  precalc();
  int n;
  scanf("%d", &n);
  scanf("%d", &K);
  A = 0;
  B = 0;
  K /= 50;
  while (n--) {
    int wt;
    scanf("%d", &wt);
    if (wt == 50)
      A++;
    else
      B++;
  }
  for (int i = 0; i < 51; i++)
    for (int j = 0; j < 51; j++) dp[i][j] = unassigned;
  pair<long long, long long> ans = solve(A, B);
  printf("%lld\n%lld", ans.first, ans.second);
}
