#include <bits/stdc++.h>
using namespace std;
long long n, k, num[2], d[2][(111)][(111)], t[2][(111)][(111)], c[(111)][(111)];
void calc() {
  for (int i = 0; i < (111); i++) c[i][i] = c[i][0] = 1;
  for (int i = 1; i < (111); i++)
    for (int j = 1; j < i; j++)
      c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % ((long long)1e9 + 7);
}
int main() {
  calc();
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    long long x;
    cin >> x;
    num[x / 50 - 1]++;
  }
  queue<pair<pair<long long, long long>, long long> > q;
  q.push({{num[0], num[1]}, 1});
  d[0][num[0]][num[1]] = t[0][num[0]][num[1]] = 1;
  while (q.size()) {
    long long x = q.front().first.first, y = q.front().first.second,
              p = q.front().second;
    bool m = ((p == 1) ? 0 : 1);
    q.pop();
    long long x2 = x, y2 = y;
    if (p == -1) x2 = num[0] - x, y2 = num[1] - y;
    for (int i = 0; i <= x2; i++)
      for (int j = 0; j <= y2; j++)
        if ((i || j) && i * 50 + j * 100 <= k) {
          if (!d[!m][x - p * i][y - p * j] ||
              d[m][x][y] < d[!m][x - p * i][y - p * j])
            t[!m][x - p * i][y - p * j] +=
                (((t[m][x][y] * c[x2][i]) % ((long long)1e9 + 7)) * c[y2][j]) %
                ((long long)1e9 + 7),
                t[!m][x - p * i][y - p * j] %= ((long long)1e9 + 7);
          if (!d[!m][x - p * i][y - p * j])
            d[!m][x - p * i][y - p * j] = d[m][x][y] + 1,
                                     q.push({{x - p * i, y - p * j}, -p});
        }
  }
  cout << d[1][0][0] - 1 << "\n" << t[1][0][0];
  return 0;
}
