#include <bits/stdc++.h>
using namespace std;
long long Hash(long long h, long long f, long long s) {
  return h * 51 * 2 + f * 2 + s;
}
struct block {
  long long h;
  long long f;
  long long s;
  long long d;
};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long N, K;
  cin >> N >> K;
  long long F = 0, H = 0;
  for (long long i = 0; i < N; i++) {
    long long x;
    cin >> x;
    if (x == 50)
      F++;
    else
      H++;
  }
  vector<vector<long long> > C(51, vector<long long>(51, 0));
  for (long long i = 0; i <= 50; i++) C[i][0] = 1;
  for (long long i = 1; i < 51; i++)
    for (long long j = 1; j <= i; j++)
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % 1000000007;
  vector<long long> level(51 * 51 * 2 + 1, -1);
  vector<bool> visited(51 * 51 * 2 + 1, false);
  vector<long long> ways(51 * 51 * 2 + 1, 0);
  block a = {H, F, 0, 0};
  queue<block> q;
  q.push(a);
  ways[Hash(H, F, 0)] = 1;
  long long d;
  while (!q.empty()) {
    a = q.front();
    q.pop();
    d = a.d;
    long long x = ways[Hash(a.h, a.f, a.s)];
    if (a.h == 0 && a.f == 0 && a.s == 1) break;
    if (visited[Hash(a.h, a.f, a.s)]) continue;
    visited[Hash(a.h, a.f, a.s)] = true;
    if (a.s == 0)
      for (long long h = 0; h <= a.h; h++)
        for (long long f = 0; f <= a.f; f++) {
          long long weight = h * 100 + f * 50;
          if (weight <= K && weight > 0 &&
              (level[Hash(a.h - h, a.f - f, 1)] < 0 ||
               level[Hash(a.h - h, a.f - f, 1)] == d + 1)) {
            ways[Hash(a.h - h, a.f - f, 1)] +=
                (((ways[Hash(a.h, a.f, 0)] * C[a.h][h]) % 1000000007) *
                 C[a.f][f]) %
                1000000007;
            ways[Hash(a.h - h, a.f - f, 1)] %= 1000000007;
            level[Hash(a.h - h, a.f - f, 1)] = d + 1;
            block n = {a.h - h, a.f - f, 1, a.d + 1};
            q.push(n);
          }
        }
    else
      for (long long h = 0; h <= H - a.h; h++)
        for (long long f = 0; f <= F - a.f; f++) {
          long long weight = h * 100 + f * 50;
          if (weight <= K && weight > 0 &&
              (level[Hash(a.h + h, a.f + f, 0)] < 0 ||
               level[Hash(a.h + h, a.f + f, 0)] == d + 1)) {
            ways[Hash(a.h + h, a.f + f, 0)] +=
                (((ways[Hash(a.h, a.f, 1)] * C[H - a.h][h]) % 1000000007) *
                 C[F - a.f][f]) %
                1000000007;
            ways[Hash(a.h + h, a.f + f, 0)] %= 1000000007;
            level[Hash(a.h + h, a.f + f, 0)] = d + 1;
            block n = {a.h + h, a.f + f, 0, a.d + 1};
            q.push(n);
          }
        }
  }
  if (ways[Hash(0, 0, 1)])
    cout << a.d << "\n";
  else
    cout << "-1\n";
  cout << ways[Hash(0, 0, 1)];
}
