#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-8;
struct node {
  int x, y, z;
  node(int a, int b, int c) { x = a, y = b, z = c; }
};
int dist[55][55][2];
long long cont[55][55][2];
long long dp[55][55];
int main() {
  memset(dp, 0, sizeof(dp));
  for (int i = 0; i < 55; i++) dp[i][0] = 1;
  for (int i = 1; i < 55; i++)
    for (int j = 1; j < 55; j++)
      dp[i][j] = (dp[i - 1][j - 1] + dp[i - 1][j]) % 1000000007;
  int n = 0, m = 0, t, k;
  cin >> t >> k;
  for (int i = 1; i <= t; i++) {
    int a;
    cin >> a;
    if (a == 50)
      m++;
    else
      n++;
  }
  memset(dist, 0, sizeof(dist));
  memset(cont, 0, sizeof(cont));
  queue<node> q;
  q.push(node(0, 0, 1));
  dist[0][0][1] = 0;
  cont[0][0][1] = 1;
  while (q.size()) {
    node tp = q.front();
    q.pop();
    int x = tp.x, y = tp.y, z = tp.z;
    int d = dist[x][y][z];
    long long c = cont[x][y][z];
    if (z == 1) x = m - x, y = n - y;
    for (int i = 0; i <= x; i++)
      for (int j = 0; j <= y; j++) {
        if (i == 0 && j == 0) continue;
        if (i * 50 + j * 100 > k) continue;
        int nx, ny, nz;
        if (z == 1)
          nx = m - x + i, ny = n - y + j;
        else
          nx = x - i, ny = y - j;
        nz = 1 - z;
        if (dist[nx][ny][nz] == 0) {
          dist[nx][ny][nz] = d + 1;
          q.push(node(nx, ny, nz));
        }
        if (dist[nx][ny][nz] == d + 1)
          cont[nx][ny][nz] =
              (cont[nx][ny][nz] +
               (((c * dp[x][i]) % 1000000007) * dp[y][j]) % 1000000007) %
              1000000007;
      }
  }
  if (dist[m][n][0] == 0) {
    cout << "-1\n0\n";
    return 0;
  }
  cout << dist[m][n][0] << "\n" << cont[m][n][0] << "\n";
  return 0;
}
