#include <bits/stdc++.h>
using namespace std;
bool check(long long n, long long pos) { return n & (1LL << pos); }
long long Set(long long n, long long pos) { return n = n | (1LL << pos); }
long long dist[100][100][2];
long long nr[100][100];
long long comb[100][100][2];
long long ncr(long long n, long long r) {
  if (r > n) return 0;
  if (r == 0) return 1;
  if (r == n) return 1;
  if (nr[n][r] != -1) return nr[n][r];
  return nr[n][r] = (ncr(n - 1, r) + ncr(n - 1, r - 1)) % 1000000007;
}
long long n, k, small, big;
struct node {
  long long small, big, state, val;
  node(long long a, long long b, long long c, long long d) {
    small = a;
    big = b;
    state = c;
    val = d;
  }
};
const bool operator<(const node &a, const node &b) { return a.val < b.val; }
long long calc(long long x, long long y, long long z) {
  return (x * ((y * z) % 1000000007)) % 1000000007;
}
pair<long long, long long> solve() {
  queue<node> st;
  st.push(node(small, big, 0, 0));
  comb[small][big][0] = 1;
  dist[small][big][0] = 0;
  while (!st.empty()) {
    node top = st.front();
    st.pop();
    for (long long i = 0; i <= top.small; i++) {
      for (long long j = 0; j <= top.big; j++) {
        if (i + j == 0) continue;
        if (i * 50 + j * 100 > k) continue;
        node nd = node(0, 0, 0, 0);
        nd.state = top.state ^ 1;
        nd.small = small - (top.small - i);
        nd.big = big - (top.big - j);
        nd.val = top.val + 1;
        if (dist[nd.small][nd.big][nd.state] > top.val + 1) {
          dist[nd.small][nd.big][nd.state] = top.val + 1;
          comb[nd.small][nd.big][nd.state] =
              calc(comb[top.small][top.big][top.state], ncr(top.small, i),
                   ncr(top.big, j));
          st.push(nd);
        } else if (dist[nd.small][nd.big][nd.state] == top.val + 1) {
          comb[nd.small][nd.big][nd.state] +=
              calc(comb[top.small][top.big][top.state], ncr(top.small, i),
                   ncr(top.big, j));
          comb[nd.small][nd.big][nd.state] %= 1000000007;
        }
      }
    }
  }
  if (dist[small][big][1] == LLONG_MAX) return {-1, 0};
  return {dist[small][big][1], comb[small][big][1]};
}
int main() {
  long long i, j, o, r, q;
  long long testcase;
  long long input, flag, tag;
  memset(nr, -1, sizeof nr);
  while (cin >> n >> k) {
    small = 0;
    big = 0;
    for (i = 0; i <= n; i++)
      for (j = 0; j <= n; j++)
        for (r = 0; r <= 1; r++) dist[i][j][r] = LLONG_MAX, comb[i][j][r] = 0;
    for (i = 1; i <= n; i++) {
      scanf("%lld", &input);
      if (input == 50)
        small++;
      else
        big++;
    }
    pair<long long, long long> ans = solve();
    printf("%lld\n%lld\n", ans.first, ans.second);
  }
}
