#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
long long p1 = 0, p2 = 0;
struct seta {
  long long first, second, T;
};
queue<seta> q;
long long g[2][53][53];
long long o[53][53];
long long x[2][53][53];
void ch() {
  for (long long i = 0; i < 52; i++) o[i][i] = o[i][0] = 1;
  for (long long i = 1; i < 52; i++)
    for (long long j = 1; j < i; j++)
      o[i][j] = (o[i - 1][j] + o[i - 1][j - 1]) % ((long long)1e9 + 7);
}
int main() {
  cin.tie();
  cout.tie();
  ios_base::sync_with_stdio(false);
  cin >> n >> k;
  ch();
  for (long long i = 0; i < n; i++) {
    cin >> m;
    if (m == 50)
      p1++;
    else if (m == 100)
      p2++;
  }
  seta ss;
  ss.first = p1;
  ss.second = p2;
  ss.T = 0;
  q.push(ss);
  g[0][p1][p2] = 1;
  x[0][p1][p2] = 1;
  while (q.size()) {
    seta s;
    s = q.front();
    q.pop();
    if (s.first + s.second == 0) continue;
    for (long long i = 0; i <= s.first; i++) {
      for (long long j = 0; j <= s.second; j++) {
        if ((i)*50 + (j)*100 <= k) {
          if ((i + p1 - s.first) <= p1 && (j + p2 - s.second) <= p2) {
            if (g[(s.T + 1) % 2][i + p1 - s.first][j + p2 - s.second] == 0 &&
                i + j != 0) {
              g[(s.T + 1) % 2][i + p1 - s.first][j + p2 - s.second] =
                  g[s.T][s.first][s.second] + 1;
              seta d;
              d.first = i + p1 - s.first;
              d.second = j + p2 - s.second;
              d.T = (s.T + 1) % 2;
              x[d.T][d.first][d.second] =
                  ((x[s.T][s.first][s.second] *
                    (o[s.first][i] * o[s.second][j]) % ((long long)1e9 + 7)) +
                   ((long long)1e9 + 7)) %
                  ((long long)1e9 + 7);
              q.push(d);
            } else if (g[s.T][s.first][s.second] + 1 <=
                           g[(s.T + 1) % 2][i + p1 - s.first]
                            [j + p2 - s.second] &&
                       i + j != 0) {
              x[(s.T + 1) % 2][i + p1 - s.first][j + p2 - s.second] +=
                  ((x[s.T][s.first][s.second] *
                    (o[s.first][i] * o[s.second][j]) % ((long long)1e9 + 7)) +
                   ((long long)1e9 + 7)) %
                  ((long long)1e9 + 7);
            }
          }
        }
      }
    }
  }
  cout << g[1][p1][p2] - 1 << '\n' << x[1][p1][p2] % ((long long)1e9 + 7);
}
