#include <bits/stdc++.h>
using namespace std;
struct Node {
  int i, j, q;
} s, t;
int n, m, k;
long long d[5000], dist[5000], C[51][51];
bool vis[5000];
queue<Node> Q;
inline int pos(Node a) { return a.i * (m + 1) + a.j + (n * (m + 1) + m) * a.q; }
void init() {
  C[0][0] = 1;
  for (int i = 1; i <= 50; i++) {
    C[i][0] = C[i][i] = 1;
    for (int j = 1; j < i; j++)
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % 1000000007;
  }
}
inline long long get_num(Node a, Node b) {
  if (a.q)
    return (C[a.i][a.i - b.i] * C[a.j][a.j - b.j]) % 1000000007;
  else
    return (C[n - a.i][b.i - a.i] * C[m - a.j][b.j - a.j]) % 1000000007;
}
void BFS() {
  while (!Q.empty()) Q.pop();
  memset(vis, 0, sizeof(vis));
  memset(d, 0, sizeof(d));
  memset(dist, 0x7f, sizeof(dist));
  d[pos(s)] = 1;
  Q.push(s);
  vis[pos(s)] = 1;
  dist[pos(s)] = 0;
  while (!Q.empty()) {
    Node u = Q.front();
    Q.pop();
    if (u.q) {
      for (int i = 0; i * 50 <= k && i <= u.i; i++) {
        for (int j = 0; j * 100 + i * 50 <= k && j <= u.j; j++) {
          if (i || j) {
            Node v = (Node){u.i - i, u.j - j, u.q ^ 1};
            long long num = get_num(u, v);
            if (dist[pos(v)] >= dist[pos(u)] + 1) {
              if (dist[pos(v)] > dist[pos(u)] + 1) {
                dist[pos(v)] = dist[pos(u)] + 1;
                Q.push(v);
              }
              d[pos(v)] =
                  (d[pos(v)] + (d[pos(u)] * num) % 1000000007) % 1000000007;
            }
          }
        }
      }
    } else {
      for (int i = 0; i * 50 <= k && i <= n - u.i; i++) {
        for (int j = 0; j * 100 + i * 50 <= k && j <= m - u.j; j++) {
          if (i || j) {
            Node v = (Node){u.i + i, u.j + j, u.q ^ 1};
            long long num = get_num(u, v);
            if (dist[pos(v)] >= dist[pos(u)] + 1) {
              if (dist[pos(v)] > dist[pos(u)] + 1) {
                dist[pos(v)] = dist[pos(u)] + 1;
                Q.push(v);
              }
              d[pos(v)] =
                  (d[pos(v)] + (d[pos(u)] * num) % 1000000007) % 1000000007;
            }
          }
        }
      }
    }
  }
}
void solve() {
  BFS();
  if (dist[pos(t)] < 0x7f7f7f7f7f7f7f7fLL) {
    printf("%I64d\n%I64d\n", dist[pos(t)], d[pos(t)] % 1000000007);
  } else
    printf("-1\n0\n");
}
int main() {
  int num;
  init();
  while (~scanf("%d%d", &num, &k)) {
    n = m = 0;
    for (int i = 0; i < num; i++) {
      int temp;
      scanf("%d", &temp);
      if (temp == 50)
        n++;
      else
        m++;
    }
    s = (Node){n, m, 1};
    t = (Node){0, 0, 0};
    solve();
  }
  return 0;
}
