#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("tune=native")
using namespace std;
const int MAX = 2e5 + 5;
const long long MOD = 1000000007;
const long long MOD2 = 2010405347;
const long long INF = 2e18;
const int dr[] = {1, 0, -1, 0, 1, 1, -1, -1, 0};
const int dc[] = {0, 1, 0, -1, 1, -1, 1, -1, 0};
const double pi = acos(-1);
const double EPS = 1e-9;
const int block = 600;
inline long long pw(long long x, long long y) {
  long long ret = 1;
  while (y) {
    if (y & 1) ret = ret * x % MOD;
    x = x * x % MOD;
    y >>= 1;
  }
  return ret;
}
long long fc[55], pre[55][55];
int n, k, a, b, x, y, c, d, dp[55][55][2], vis[55][55][2], val;
bool mv;
queue<pair<long long, pair<int, int> > > q;
inline void ins(int x, int y) {
  if (vis[x][y][mv] == -1) {
    vis[x][y][mv] = val;
    q.push({mv, {x, y}});
  }
  return;
}
int f(int x, int y, bool mv) {
  if (dp[x][y][mv] != -1) return dp[x][y][mv];
  if (!x && !y && mv) return dp[x][y][mv] = 1;
  long long ret = 0;
  int val = vis[x][y][mv] + 1;
  mv ^= 1;
  if (mv) {
    for (int i = 0; i <= x; ++i)
      for (int j = 0; j <= y; ++j) {
        if (i + j * 2 > k) break;
        if ((i || j) && vis[x - i][y - j][mv] == val)
          ret += f(x - i, y - j, mv) * pre[x][i] % MOD * pre[y][j] % MOD;
      }
  } else {
    int c = a - x, d = b - y;
    for (int i = 0; i <= c; ++i)
      for (int j = 0; j <= d; ++j) {
        if (i + j * 2 > k) break;
        if ((i || j) && vis[x + i][y + j][mv] == val)
          ret += f(x + i, y + j, mv) * pre[c][i] % MOD * pre[d][j] % MOD;
      }
  }
  return dp[x][y][mv ^ 1] = ret % MOD;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  fc[0] = 1;
  for (int i = 1; i <= 50; ++i) fc[i] = fc[i - 1] * i % MOD;
  for (int i = 0; i <= 50; ++i)
    for (int j = 0; j <= i; ++j)
      pre[i][j] =
          fc[i] * pw(fc[j], MOD - 2) % MOD * pw(fc[i - j], MOD - 2) % MOD;
  cin >> n >> k;
  k /= 50;
  for (int i = 1; i <= n; ++i) {
    cin >> x;
    if (x == 50)
      ++a;
    else
      ++b;
  }
  memset(vis, -1, sizeof vis);
  vis[a][b][0] = 0;
  q.push({0, {a, b}});
  while (!q.empty()) {
    x = q.front().second.first, y = q.front().second.second,
    mv = q.front().first, q.pop();
    val = vis[x][y][mv] + 1;
    mv ^= 1;
    if (mv) {
      for (int i = 0; i <= x; ++i)
        for (int j = 0; j <= y; ++j) {
          if (i + j * 2 > k) break;
          if (i || j) ins(x - i, y - j);
        }
    } else {
      c = a - x, d = b - y;
      for (int i = 0; i <= c; ++i)
        for (int j = 0; j <= d; ++j) {
          if (i + j * 2 > k) break;
          if (i || j) ins(x + i, y + j);
        }
    }
  }
  cout << vis[0][0][1] << '\n';
  memset(dp, -1, sizeof dp);
  cout << f(a, b, 0) << '\n';
  return 0;
}
