#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
int n, m;
int c1 = 0, c2 = 0;
bool u[60][60][2];
int dp[60][60][2];
long long mod = 1e9 + 7;
long long calc[60][60][2];
long long first[150];
long long bp(long long a, long long b) {
  if (!b) return 1;
  if (b & 1) return a * bp(a, b - 1) % mod;
  long long x = bp(a, b >> 1);
  return x * x % mod;
}
long long cc(int n, int k) {
  return first[n] * bp(first[n - k] * first[k] % mod, mod - 2) % mod;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  first[0] = 1;
  for (int i = 1; i <= 100; ++i) {
    first[i] = first[i - 1] * i % mod;
  }
  cin >> n >> m;
  for (int i = 1, x; i <= n; ++i) {
    cin >> x;
    c1 += x == 50;
    c2 += x == 100;
  }
  queue<pair<pair<int, int>, int>> q;
  u[c1][c2][0] = 0;
  q.push({{c1, c2}, 0});
  calc[c1][c2][0] = 1;
  int mn = 0;
  while (!q.empty()) {
    int a = q.front().first.first;
    int b = q.front().first.second;
    int c = c1 - a;
    int d = c2 - b;
    bool k = q.front().second;
    q.pop();
    if (a == b && a == 0) {
      mn = dp[a][b][k];
      break;
    }
    if (k == 0) {
      for (int i = 0; i <= a; ++i) {
        for (int j = 0; j <= b; ++j) {
          if (i + j > 0 && i * 50 + j * 100 <= m) {
            if (!u[a - i][b - j][k ^ 1] ||
                dp[a - i][b - j][k ^ 1] == dp[a][b][k] + 1) {
              (calc[a - i][b - j][k ^ 1] +=
               calc[a][b][k] * cc(a, i) % mod * cc(b, j) % mod) %= mod;
            }
            if (!u[a - i][b - j][k ^ 1]) {
              u[a - i][b - j][k ^ 1] = 1;
              dp[a - i][b - j][k ^ 1] = dp[a][b][k] + 1;
              q.push({{a - i, b - j}, k ^ 1});
            }
          }
        }
      }
    } else {
      for (int i = 0; i <= c; ++i) {
        for (int j = 0; j <= d; ++j) {
          if (i + j > 0 && i * 50 + j * 100 <= m) {
            if (!u[a + i][b + j][k ^ 1] ||
                dp[a + i][b + j][k ^ 1] == dp[a][b][k] + 1) {
              (calc[a + i][b + j][k ^ 1] +=
               calc[a][b][k] * cc(c, i) % mod * cc(d, j) % mod) %= mod;
            }
            if (!u[a + i][b + j][k ^ 1]) {
              u[a + i][b + j][k ^ 1] = 1;
              dp[a + i][b + j][k ^ 1] = dp[a][b][k] + 1;
              q.push({{a + i, b + j}, k ^ 1});
            }
          }
        }
      }
    }
  }
  if (mn == 0) {
    cout << -1 << '\n' << 0;
  } else {
    cout << mn << '\n';
    cout << calc[0][0][1];
  }
  return 0;
}
