#include <bits/stdc++.h>
using namespace std;
const int N = 60;
const int mod = 1e9 + 7;
bool mark[N][N][2];
int cost[N][N][2], C[N][N];
long long cnt[N][N][2];
int main() {
  int n, k, x, a = 0, b = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> x;
    a += x == 50;
    b += x == 100;
  }
  for (int i = 0; i < N; i++)
    for (int j = 0; j < N; j++) cost[i][j][0] = cost[i][j][1] = 1e9 + 10;
  for (int i = 0; i < N; i++) C[i][i] = C[i][0] = 1;
  for (int i = 1; i < N; i++)
    for (int j = 1; j <= i; j++)
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;
  queue<pair<pair<int, int>, int> > q;
  q.push({{a, b}, 0});
  mark[a][b][0] = 1;
  cost[a][b][0] = 0;
  cnt[a][b][0] = 1;
  while (!q.empty()) {
    int t = q.front().second, x = q.front().first.first,
        y = q.front().first.second, c = cost[x][y][t];
    q.pop();
    if (t == 1) {
      for (int i = 0; i <= a - x; i++) {
        for (int j = 0; j <= b - y; j++) {
          if (i * 50 + j * 100 <= k && i + j != 0) {
            if (c < cost[x + i][y + j][0]) {
              cost[x + i][y + j][0] = c + 1;
              cnt[x + i][y + j][0] =
                  (cnt[x + i][y + j][0] +
                   ((cnt[x][y][1] * C[a - x][i]) % mod * C[b - y][j]) % mod) %
                  mod;
              if (!mark[x + i][y + j][0]) q.push({{x + i, y + j}, 0});
              mark[x + i][y + j][0] = 1;
            }
          }
        }
      }
    } else {
      for (int i = 0; i <= x; i++) {
        for (int j = 0; j <= y; j++) {
          if (i * 50 + j * 100 <= k && i + j != 0) {
            if (c < cost[x - i][y - j][1]) {
              cost[x - i][y - j][1] = c + 1;
              cnt[x - i][y - j][1] =
                  (cnt[x - i][y - j][1] +
                   ((cnt[x][y][0] * C[x][i]) % mod * C[y][j]) % mod) %
                  mod;
              if (!mark[x - i][y - j][1]) q.push({{x - i, y - j}, 1});
              mark[x - i][y - j][1] = 1;
            }
          }
        }
      }
    }
  }
  if (cost[0][0][1] == 1e9 + 10)
    cout << -1 << '\n';
  else
    cout << cost[0][0][1] << '\n';
  cout << cnt[0][0][1];
  return 0;
}
