#include <bits/stdc++.h>
using namespace std;
const int N = 55;
const int MOD = 1e9 + 7;
struct state {
  int fLeft;
  int hLeft;
  int side;
  state(int a, int b, int c) {
    fLeft = a;
    hLeft = b;
    side = c;
  }
};
long long nCr[N][N], ways[2][N][N], dist[2][N][N];
int n, k, dat[N], fCnt, hCnt;
queue<state> q;
void init() {
  for (int i = 0; i < N; i++)
    for (int j = 0; j < N; j++)
      if (j == 0 || i == j)
        nCr[i][j] = 1;
      else
        nCr[i][j] = (nCr[i - 1][j] + nCr[i - 1][j - 1]) % MOD;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> dat[i];
    if (dat[i] == 50)
      fCnt++;
    else
      hCnt++;
  }
  if (fCnt > 0 && k < 50) {
    cout << "-1\n0\n";
    return 0;
  }
  if (hCnt > 0 && k < 100) {
    cout << "-1\n0\n";
    return 0;
  }
  init();
  memset(dist, -1, sizeof(dist));
  dist[0][fCnt][hCnt] = 0;
  ways[0][fCnt][hCnt] = 1;
  q.push(state(fCnt, hCnt, 0));
  while (!q.empty()) {
    state curr = q.front(), nxt(0, 0, 0);
    long long currDist = dist[curr.side][curr.fLeft][curr.hLeft];
    q.pop();
    if (curr.side == 0) {
      for (int i = 0; i <= curr.fLeft; i++) {
        for (int j = 0; j <= curr.hLeft; j++) {
          long long currWeight = i * 50 + j * 100;
          if (currWeight == 0 || currWeight > k) continue;
          long long currWays = (nCr[curr.fLeft][i] * nCr[curr.hLeft][j]) % MOD;
          currWays = (ways[curr.side][curr.fLeft][curr.hLeft] * currWays) % MOD;
          nxt.fLeft = curr.fLeft - i;
          nxt.hLeft = curr.hLeft - j;
          nxt.side = 1 - curr.side;
          if (dist[nxt.side][nxt.fLeft][nxt.hLeft] == -1) {
            dist[nxt.side][nxt.fLeft][nxt.hLeft] = 1 + currDist;
            ways[nxt.side][nxt.fLeft][nxt.hLeft] = currWays;
            q.push(nxt);
            continue;
          }
          if (dist[nxt.side][nxt.fLeft][nxt.hLeft] == 1 + currDist) {
            ways[nxt.side][nxt.fLeft][nxt.hLeft] =
                (ways[nxt.side][nxt.fLeft][nxt.hLeft] + currWays) % MOD;
          }
        }
      }
    } else {
      for (int i = 0; i <= fCnt - curr.fLeft; i++) {
        for (int j = 0; j <= hCnt - curr.hLeft; j++) {
          long long currWeight = i * 50 + j * 100;
          if (currWeight == 0 || currWeight > k) continue;
          long long currWays =
              (nCr[fCnt - curr.fLeft][i] * nCr[hCnt - curr.hLeft][j]) % MOD;
          currWays = (ways[curr.side][curr.fLeft][curr.hLeft] * currWays) % MOD;
          nxt.fLeft = curr.fLeft + i;
          nxt.hLeft = curr.hLeft + j;
          nxt.side = 1 - curr.side;
          if (dist[nxt.side][nxt.fLeft][nxt.hLeft] == -1) {
            dist[nxt.side][nxt.fLeft][nxt.hLeft] = 1 + currDist;
            ways[nxt.side][nxt.fLeft][nxt.hLeft] = currWays;
            q.push(nxt);
            continue;
          }
          if (dist[nxt.side][nxt.fLeft][nxt.hLeft] == 1 + currDist) {
            ways[nxt.side][nxt.fLeft][nxt.hLeft] =
                (ways[nxt.side][nxt.fLeft][nxt.hLeft] + currWays) % MOD;
          }
        }
      }
    }
  }
  cout << dist[1][0][0] << "\n";
  cout << ways[1][0][0] << "\n";
  return 0;
}
