#include <bits/stdc++.h>
const long long INF = (long long)1e18 + 123;
const int inf = (int)2e9 + 123;
const int mod = 1e9 + 7;
using namespace std;
int f = 0, s = 0, n, k;
long long d[1011][1011], dp[2][62][62], mini[2][62][62];
bool upd(int t, int x, int y, int i2, int j2, long long add) {
  if (mini[t ^ 1][i2][j2] != -1) {
    if (mini[t ^ 1][i2][j2] == mini[t][x][y] + 1) {
      dp[t ^ 1][i2][j2] = (dp[t ^ 1][i2][j2] + add) % mod;
    }
    return 0;
  }
  mini[t ^ 1][i2][j2] = mini[t][x][y] + 1;
  dp[t ^ 1][i2][j2] = add;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  for (int i = 0; i <= 60; i++) {
    d[i][0] = d[i][i] = 1;
    for (int j = 1; j < i; j++) {
      d[i][j] = (d[i - 1][j] + d[i - 1][j - 1]) % mod;
    }
  }
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    if (x == 50)
      f++;
    else
      s++;
  }
  for (int i = 0; i <= 1; i++) {
    for (int j = 0; j <= 60; j++) {
      for (int k = 0; k <= 60; k++) {
        mini[i][j][k] = -1;
      }
    }
  }
  queue<pair<int, pair<int, int> > > q;
  mini[0][f][s] = 0;
  dp[0][f][s] = 1;
  q.push(make_pair(0, make_pair(f, s)));
  while (q.size()) {
    int t = q.front().first, x = q.front().second.first,
        y = q.front().second.second;
    q.pop();
    for (int i = 0; i <= x; i++) {
      for (int j = 0; j <= y && i * 50 + j * 100 <= k; j++) {
        if (i + j == 0) continue;
        if (upd(t, x, y, f - x + i, s - y + j,
                (1ll * dp[t][x][y] * (d[x][i] * d[y][j] % mod)) % mod))
          q.push(make_pair(t ^ 1, make_pair(f - x + i, s - y + j)));
      }
    }
  }
  cout << mini[1][f][s] << "\n" << dp[1][f][s];
  return 0;
}
