#include <bits/stdc++.h>
using namespace std;
long long a, b, n, k;
long long d[2][55][55];
long long cnt[2][55][55];
long long v[2][55][55];
long long nCr[55][55];
struct node {
  long long s;
  int n50;
  long long n100;
  node(long long a, long long b, long long c) {
    s = a;
    n50 = b;
    n100 = c;
  }
};
void precalc() {
  nCr[0][0] = nCr[1][0] = nCr[1][1] = 1;
  for (long long i = 2; i <= 50; i++) {
    nCr[i][0] = nCr[i][i] = 1;
    for (long long j = 1; j < i; j++)
      nCr[i][j] = (nCr[i - 1][j] + nCr[i - 1][j - 1]) % 1000000007;
  }
}
long long calc() {
  memset(v, 0, sizeof(v));
  memset(cnt, 0, sizeof(cnt));
  long long i, j;
  node rt(0, a, b);
  d[0][a][b] = 0;
  v[0][a][b] = 1;
  cnt[0][a][b] = 1;
  queue<node> que;
  que.push(rt);
  while (!que.empty()) {
    node u = que.front();
    que.pop();
    long long p, q, r;
    p = u.s, q = u.n50, r = u.n100;
    for (i = 0; i <= q; i++) {
      for (j = 0; j <= r; j++) {
        if (i + j == 0) continue;
        if (i * 50 + j * 100 > k) continue;
        if (!v[!p][a - q + i][b - r + j]) {
          v[!p][a - q + i][b - r + j] = 1;
          cnt[!p][a - q + i][b - r + j] =
              (cnt[!p][a - q + i][b - r + j] +
               (nCr[q][i] * nCr[r][j]) % 1000000007 * cnt[p][q][r]) %
              1000000007;
          d[!p][a - q + i][b - r + j] = d[p][q][r] + 1;
          node x(!p, a - q + i, b - r + j);
          que.push(x);
        } else if (d[!p][a - q + i][b - r + j] == d[p][q][r] + 1)
          cnt[!p][a - q + i][b - r + j] =
              (cnt[!p][a - q + i][b - r + j] +
               (nCr[q][i] * nCr[r][j]) % 1000000007 * cnt[p][q][r]) %
              1000000007;
      }
    }
  }
  if (v[1][a][b])
    return 1;
  else
    return 0;
}
int main() {
  long long i, j, x;
  cin >> n >> k;
  a = b = 0;
  precalc();
  for (i = 0; i < n; i++) {
    cin >> j;
    if (j == 50)
      a++;
    else
      b++;
  }
  x = calc();
  if (x)
    cout << d[1][a][b] << endl << cnt[1][a][b];
  else
    cout << -1 << endl << 0;
  return 0;
}
