#include <bits/stdc++.h>
using namespace std;
const int INF = 1E9 + 7;
template <class C>
void mini(C& a4, C b4) {
  a4 = min(a4, b4);
}
template <class C>
void maxi(C& a4, C b4) {
  a4 = max(a4, b4);
}
int n, k;
int il[2];
const long long mod = 1E9 + 7;
int best[2][55][55];
long long ile[2][55][55];
int a, b;
long long binom[55][55];
int main() {
  ios_base::sync_with_stdio(false);
  binom[0][0] = 1;
  for (int i = (1); i <= (55 - 1); ++i) {
    binom[i][0] = 1;
    for (int j = (1); j <= (55 - 1); ++j) {
      binom[i][j] = (binom[i - 1][j] + binom[i - 1][j - 1]) % mod;
    }
  }
  cin >> n >> k;
  for (int i = (1); i <= (n); ++i) {
    int x;
    cin >> x;
    if (x == 50)
      il[0]++;
    else
      il[1]++;
  }
  for (int s = (0); s <= (1); ++s)
    for (int i = (0); i <= (55 - 1); ++i)
      for (int j = (0); j <= (55 - 1); ++j) best[s][i][j] = INF;
  a = il[0];
  b = il[1];
  best[0][a][b] = 0;
  ile[0][a][b] = 1;
  for (int moves = (0); moves <= (55 * 55 * 10); ++moves) {
    for (int s = (0); s <= (1); ++s)
      for (int i = (0); i <= (a); ++i)
        for (int j = (0); j <= (b); ++j) {
          if (best[s][i][j] == moves) {
            for (int ii = (0); ii <= (i); ++ii)
              for (int jj = (0); jj <= (j); ++jj)
                if (ii || jj) {
                  if (ii * 50 + jj * 100 > k) break;
                  int x = a - i;
                  int y = b - j;
                  x += ii;
                  y += jj;
                  long long il = (binom[i][ii] * binom[j][jj]) % mod;
                  if (moves + 1 < best[1 - s][x][y]) {
                    best[1 - s][x][y] = moves + 1;
                    ile[1 - s][x][y] = (ile[s][i][j] * il) % mod;
                  } else if (moves + 1 == best[1 - s][x][y]) {
                    ile[1 - s][x][y] += (ile[s][i][j] * il) % mod;
                    ile[1 - s][x][y] %= mod;
                  }
                }
          }
        }
  }
  if (best[1][a][b] == INF) best[1][a][b] = -1;
  cout << best[1][a][b] << endl << ile[1][a][b] << endl;
  return 0;
}
