#include <bits/stdc++.h>
using namespace std;
const int N = 55;
const int MOD = 1e9 + 7;
struct Node {
  int op, x, y, d;
  Node() {}
  Node(int _op, int _x, int _y, int _d) { op = _op, x = _x, y = _y, d = _d; }
  bool operator<(const Node &cur) const { return d > cur.d; }
};
priority_queue<Node> que;
int dist[2][N][N], n, m, nx, ny;
long long ans[2][N][N], C[N][N];
void init() {
  int i, j;
  memset(C, 0, sizeof(C));
  for (i = 0; i < N; i++) {
    C[i][0] = 1;
    for (j = 1; j <= i; j++) C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % MOD;
  }
}
int main() {
  int i, j, tmp;
  init();
  while (scanf("%d%d", &n, &m) != EOF) {
    for (i = 1, nx = ny = 0; i <= n; i++) {
      scanf("%d", &tmp);
      if (tmp == 50)
        nx++;
      else
        ny++;
    }
    memset(dist, 0x3f, sizeof(dist));
    memset(ans, 0, sizeof(ans));
    while (!que.empty()) que.pop();
    dist[1][0][0] = 0;
    ans[1][0][0] = 1;
    que.push(Node(1, 0, 0, 0));
    while (!que.empty()) {
      Node cur = que.top();
      que.pop();
      if (cur.d > dist[cur.op][cur.x][cur.y]) continue;
      for (i = 0; i <= nx; i++)
        for (j = 0; j <= ny; j++) {
          if (i + j == 0 || 50 * i + 100 * j > m) continue;
          if (cur.op == 0 && cur.x >= i && cur.y >= j) {
            if (dist[1][cur.x - i][cur.y - j] >= cur.d + 1) {
              if (dist[1][cur.x - i][cur.y - j] > cur.d + 1) {
                ans[1][cur.x - i][cur.y - j] = 0;
                dist[1][cur.x - i][cur.y - j] = cur.d + 1;
                que.push(Node(1, cur.x - i, cur.y - j, cur.d + 1));
              }
              ans[1][cur.x - i][cur.y - j] +=
                  ans[0][cur.x][cur.y] * C[cur.x][i] % MOD * C[cur.y][j] % MOD;
              ans[1][cur.x - i][cur.y - j] %= MOD;
            }
          }
          if (cur.op == 1 && cur.x + i <= nx && cur.y + j <= ny) {
            if (dist[0][cur.x + i][cur.y + j] >= cur.d + 1) {
              if (dist[0][cur.x + i][cur.y + j] > cur.d + 1) {
                ans[0][cur.x + i][cur.y + j] = 0;
                dist[0][cur.x + i][cur.y + j] = cur.d + 1;
                que.push(Node(0, cur.x + i, cur.y + j, cur.d + 1));
              }
              ans[0][cur.x + i][cur.y + j] += ans[1][cur.x][cur.y] *
                                              C[nx - cur.x][i] % MOD *
                                              C[ny - cur.y][j] % MOD;
              ans[0][cur.x + i][cur.y + j] %= MOD;
            }
          }
        }
    }
    if (dist[0][nx][ny] == 0x3f3f3f3f) {
      printf("-1\n0\n");
    } else {
      printf("%d\n%I64d\n", dist[0][nx][ny], ans[0][nx][ny]);
    }
  }
  return 0;
}
