#include <bits/stdc++.h>
using namespace std;
const double eps(1e-8);
const int mod = 1000000007;
struct Point {
  Point(const int &a = 0, const int &b = 0, const int &c = 0) {
    x = a, y = b, cur = c;
  }
  int x, y, cur;
} tmp;
int n, m, a, b, A, B;
queue<Point> q;
int f[55][55][2], g[55][55][2];
bool v[55][55][2];
int c[55][55];
void Add(int &a, int b) {
  a += b;
  if (a >= mod) a -= mod;
}
void Mul(int &a, int b) {
  long long ret = a, tmp = b;
  ret = ret * tmp % mod;
  a = (int)ret;
}
void Check(int a, int b, int cur) {
  int t;
  t = g[tmp.x][tmp.y][tmp.cur];
  if (cur) {
    Mul(t, c[tmp.x][tmp.x - a]);
    Mul(t, c[tmp.y][tmp.y - b]);
  } else {
    Mul(t, c[A - tmp.x][a - tmp.x]);
    Mul(t, c[B - tmp.y][b - tmp.y]);
  }
  if (f[tmp.x][tmp.y][tmp.cur] + 1 == f[a][b][cur]) {
    Add(g[a][b][cur], t);
    if (!v[a][b][cur]) {
      q.push(Point(a, b, cur));
      v[a][b][cur] = true;
    }
  }
  if (f[tmp.x][tmp.y][tmp.cur] + 1 < f[a][b][cur]) {
    f[a][b][cur] = f[tmp.x][tmp.y][tmp.cur] + 1;
    g[a][b][cur] = t;
    if (!v[a][b][cur]) {
      q.push(Point(a, b, cur));
      v[a][b][cur] = true;
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  m /= 50;
  int t;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &t);
    if (t == 50)
      a++;
    else
      b++;
  }
  A = a, B = b;
  for (int i = 0; i <= 50; i++)
    for (int j = 0; j <= i; j++)
      c[i][j] = (j == 0) ? 1 : (c[i - 1][j - 1] + c[i - 1][j]) % mod;
  for (int i = 0; i <= a; i++)
    for (int j = 0; j <= b; j++) f[i][j][0] = f[i][j][1] = mod;
  q.push(Point(a, b, 0));
  f[a][b][0] = 0;
  g[a][b][0] = 1;
  memset(v, 0, sizeof(v));
  v[a][b][0] = true;
  while (!q.empty()) {
    tmp = q.front();
    if (f[tmp.x][tmp.y][tmp.cur] >= f[0][0][1] && f[0][0][1]) {
      v[tmp.x][tmp.y][tmp.cur] = false;
      q.pop();
      continue;
    }
    if (tmp.cur == 0) {
      for (int i = 0; i <= tmp.x; i++)
        for (int j = 0; j <= tmp.y; j++)
          if (i + j * 2 <= m && i + j > 0) {
            Check(tmp.x - i, tmp.y - j, 1);
          }
    } else {
      for (int i = 0; i <= a - tmp.x; i++)
        for (int j = 0; j <= b - tmp.y; j++)
          if (i + j > 0 && i + j * 2 <= m) Check(tmp.x + i, tmp.y + j, 0);
    }
    v[tmp.x][tmp.y][tmp.cur] = false;
    q.pop();
  }
  if (f[0][0][1] == mod) f[0][0][1] = -1;
  cout << f[0][0][1] << endl;
  cout << g[0][0][1] << endl;
  return 0;
}
