#include <bits/stdc++.h>
using namespace std;
const long long N = 53, INF = 1e18, MOD = 1e9 + 7;
long long dis[N][N][2], way[N][N][2];
long long POW(long long a, long long b) {
  if (b == 0) return 1;
  long long ans = POW(a, b / 2);
  ans *= ans;
  ans %= MOD;
  if (b % 2) ans *= a;
  ans %= MOD;
  return ans;
}
long long C(long long a, long long b) {
  if (b == 0) return 1;
  long long ans = 1, res = 1;
  for (long long i = b - a + 1; i <= b; i++) ans *= i, ans %= MOD;
  for (long long i = 1; i <= a; i++) res *= i, res %= MOD;
  return (ans * POW(res, MOD - 2)) % MOD;
}
inline void BFS(long long a, long long b, long long k) {
  queue<pair<pair<long long, long long>, bool> > q;
  for (long long i = 0; i <= a; i++)
    for (long long j = 0; j <= b; j++) dis[i][j][0] = dis[i][j][1] = INF;
  dis[a][b][0] = 0;
  way[a][b][0] = 1;
  q.push({{a, b}, 0});
  while (!q.empty()) {
    long long x = q.front().first.first, y = q.front().first.second,
              t = q.front().second;
    q.pop();
    if (t) {
      x = a - x;
      y = b - y;
    }
    for (long long i = 0; i <= x; i++) {
      for (long long j = 0; j <= y; j++) {
        if (i + j > 0 && i * 50 + j * 100 <= k) {
          long long nx, ny;
          if (t) {
            x = a - x;
            y = b - y;
            nx = x + i, ny = y + j;
          } else {
            nx = x - i, ny = y - j;
          }
          if (dis[nx][ny][!t] > dis[x][y][t] + 1) {
            dis[nx][ny][!t] = dis[x][y][t] + 1;
            q.push({{nx, ny}, !t});
          }
          if (dis[nx][ny][!t] == dis[x][y][t] + 1) {
            if (t)
              way[nx][ny][!t] +=
                  (way[x][y][t] * C(i, a - x) * C(j, b - y)) % MOD;
            else
              way[nx][ny][!t] += (way[x][y][t] * C(i, x) * C(j, y)) % MOD;
            way[nx][ny][!t] %= MOD;
          }
          if (t) {
            x = a - x;
            y = b - y;
          }
        }
      }
    }
  }
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, k;
  cin >> n >> k;
  long long a = 0, b = 0;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    if (x == 50)
      a++;
    else
      b++;
  }
  BFS(a, b, k);
  if (dis[0][0][1] >= INF)
    cout << -1 << endl << 0;
  else
    cout << dis[0][0][1] << endl << way[0][0][1];
  return 0;
}
