#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int N, K, X, Y;
long long d[55][55][2], f[55][55][2];
bool g[55][55][2];
long long c[55][55];
int main(void) {
  cin >> N >> K;
  K /= 50;
  for (int i = (0), _b = (N); i <= _b; i++) c[i][0] = c[i][i] = 1;
  for (int i = (1), _b = (N); i <= _b; i++)
    for (int j = (1), _b = (i - 1); j <= _b; j++)
      c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % mod;
  int w;
  for (int i = (1), _b = (N); i <= _b; i++) {
    cin >> w;
    if (w == 50)
      ++X;
    else
      ++Y;
  }
  d[X][Y][0] = 0, f[X][Y][0] = 1;
  g[X][Y][0] = 1;
  queue<pair<pair<long long, long long>, bool> > q;
  q.push(pair<pair<long long, long long>, bool>(
      pair<long long, long long>(X, Y), 0));
  while (!q.empty()) {
    int x = q.front().first.first, y = q.front().first.second,
        t = q.front().second;
    q.pop();
    for (int i = (0), _b = (x); i <= _b; i++)
      for (int j = (0), _b = (y); j <= _b; j++)
        if (i + j && i + 2 * j <= K) {
          int nx = X - x + i, ny = Y - y + j;
          if (g[nx][ny][!t]) {
            if (d[nx][ny][!t] == d[x][y][t] + 1)
              f[nx][ny][!t] =
                  (f[nx][ny][!t] + f[x][y][t] * c[x][i] % mod * c[y][j] % mod) %
                  mod;
          } else {
            g[nx][ny][!t] = 1;
            d[nx][ny][!t] = d[x][y][t] + 1;
            f[nx][ny][!t] = f[x][y][t] * c[x][i] % mod * c[y][j] % mod;
            q.push(pair<pair<long long, long long>, bool>(
                pair<long long, long long>(nx, ny), !t));
          }
        }
  }
  if (!g[X][Y][1]) return cout << -1 << endl << 0 << endl, 0;
  cout << d[X][Y][1] << endl << f[X][Y][1] << endl;
  return 0;
}
