#include <bits/stdc++.h>
using namespace std;
template <class T>
void print(vector<T> v) {
  cerr << "[";
  if (v.size()) cerr << v[0];
  for (int i = (1); i < (v.size()); ++i) cerr << ", " << v[i];
  cerr << "]n";
}
template <class T>
string i2s(T x) {
  ostringstream o;
  o << x;
  return o.str();
}
vector<string> splt(string s, char c = ' ') {
  vector<string> all;
  int p = 0, np;
  while (np = s.find(c, p), np >= 0) {
    if (np != p) all.push_back(s.substr(p, np - p));
    p = np + 1;
  }
  if (p < s.size()) all.push_back(s.substr(p));
  return all;
}
int n1, n2, k;
long long dp[60][60][220];
long long ok[60][60][220];
long long ch[100][100];
int best = 210;
long long go(int a1, int a2, int t) {
  long long &rv = dp[a1][a2][t];
  if (rv != -1) return rv;
  if (t > best) return rv = 0;
  if (a1 == 0 && a2 == 0) {
    best = min(best, t);
    ok[a1][a2][t] = 1;
    return rv = 1;
  }
  int b1 = n1 - a1;
  int b2 = n2 - a2;
  rv = 0;
  if (t % 2 == 0) {
    for (int i1 = (0); i1 < (a1 + 1); ++i1)
      for (int i2 = (0); i2 < (a2 + 1); ++i2)
        if (i1 + i2 * 2 <= k && (i1 || i2)) {
          go(a1 - i1, a2 - i2, t + 1);
          if (ok[a1 - i1][a2 - i2][t + 1]) {
            ok[a1][a2][t] = 1;
            dp[a1][a2][t] =
                (dp[a1][a2][t] +
                 (((long long)ch[i1][a1] * ch[i2][a2]) % 1000000007) *
                     dp[a1 - i1][a2 - i2][t + 1]) %
                1000000007;
          }
        }
  } else {
    for (int i1 = (0); i1 < (b1 + 1); ++i1)
      for (int i2 = (0); i2 < (b2 + 1); ++i2)
        if (i1 + i2 * 2 <= k && (i1 || i2)) {
          go(a1 + i1, a2 + i2, t + 1);
          if (ok[a1 + i1][a2 + i2][t + 1]) {
            ok[a1][a2][t] = 1;
            dp[a1][a2][t] =
                (dp[a1][a2][t] +
                 (((long long)ch[i1][b1] * ch[i2][b2]) % 1000000007) *
                     dp[a1 + i1][a2 + i2][t + 1]) %
                1000000007;
          }
        }
  }
  return rv;
}
int main() {
  ch[0][0] = 1;
  for (int i = (1); i < (51); ++i) {
    ch[0][i] = 1;
    for (int j = (1); j < (i + 1); ++j)
      ch[j][i] = (ch[j][i - 1] + ch[j - 1][i - 1]) % 1000000007;
  }
  int n;
  cin >> n >> k;
  for (int i = (0); i < (n); ++i) {
    int x;
    cin >> x;
    if (x == 50)
      n1++;
    else
      n2++;
  }
  k /= 50;
  memset(dp, -1, sizeof(dp));
  go(n1, n2, 0);
  if (best < 210) {
    memset(dp, -1, sizeof(dp));
    memset(ok, 0, sizeof(ok));
    go(n1, n2, 0);
    cout << best << endl << dp[n1][n2][0] << endl;
  } else {
    cout << -1 << endl << 0 << endl;
  }
}
