#include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7, n, k, n1, n2;
int memo[55][55];
int C(int a, int b) {
  if (b == 0) return 1;
  if (a == 0) return 0;
  if (memo[a][b] != -1) return memo[a][b];
  return memo[a][b] = (C(a - 1, b - 1) + C(a - 1, b)) % mod;
}
int main() {
  cout.sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  k /= 50;
  int a = 0, b = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x == 50)
      a++;
    else
      b++;
  }
  n1 = a;
  n2 = b;
  int dist[a + 1][b + 1][2];
  int acc[a + 1][b + 1][2];
  for (int i = 0; i <= a; i++)
    for (int j = 0; j <= b; j++)
      for (int c = 0; c < 2; c++) {
        dist[i][j][c] = 1e9;
        acc[i][j][c] = 0;
      }
  dist[a][b][0] = 0;
  acc[a][b][0] = 1;
  memset(memo, -1, sizeof memo);
  queue<tuple<int, int, int> > q;
  q.push(tuple<int, int, int>(a, b, 0));
  while (!q.empty()) {
    tuple<int, int, int> u = q.front();
    q.pop();
    int esq1, esq2, lado;
    tie(esq1, esq2, lado) = u;
    if (esq1 + esq2 == 0 && lado == 1) break;
    int dir1 = n1 - esq1, dir2 = n2 - esq2;
    for (int i = 0; i <= (lado == 0 ? esq1 : dir1) && i <= k; i++) {
      int maxi = min((lado == 0 ? esq2 : dir2), (k - i) / 2);
      for (int j = 0; j <= maxi; j++) {
        if (i + j == 0) continue;
        int nesq1 = esq1 + (lado == 0 ? -i : +i),
            nesq2 = esq2 + (lado == 0 ? -j : +j);
        int nlado = !lado;
        int way = 1LL * C((lado == 0 ? esq1 : dir1), i) *
                  C((lado == 0 ? esq2 : dir2), j) % mod;
        if (dist[esq1][esq2][lado] + 1 < dist[nesq1][nesq2][nlado]) {
          dist[nesq1][nesq2][nlado] = dist[esq1][esq2][lado] + 1;
          acc[nesq1][nesq2][nlado] = 1LL * acc[esq1][esq2][lado] * way % mod;
          q.push(tuple<int, int, int>(nesq1, nesq2, nlado));
        } else if (dist[esq1][esq2][lado] + 1 == dist[nesq1][nesq2][nlado]) {
          acc[nesq1][nesq2][nlado] += 1LL * acc[esq1][esq2][lado] * way % mod;
          acc[nesq1][nesq2][nlado] %= mod;
        }
      }
    }
  }
  if (dist[0][0][1] >= 1e9) {
    cout << -1 << endl;
    cout << 0 << endl;
  } else {
    cout << dist[0][0][1] << endl;
    cout << acc[0][0][1] << endl;
  }
  return 0;
}
