#include <bits/stdc++.h>
using namespace std;
int n, maxk;
long long dp[60][60][250][3], c[70][70];
int tp1, tp2;
int mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> maxk;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a == 50)
      tp1++;
    else
      tp2++;
  }
  c[1][0] = 1;
  c[1][1] = 1;
  for (int i = 2; i < 60; i++) {
    for (int j = 0; j <= i; j++) {
      c[0][j] = 1;
      if (j == 0 || j == i)
        c[i][j] = 1;
      else {
        c[i][j] = c[i - 1][j] + c[i - 1][j - 1];
        c[i][j] %= mod;
      }
    }
  }
  dp[tp1][tp2][0][0] = 1;
  dp[0][0][0][1] = 1;
  for (int i = 0; i < 200; i++)
    for (int a1 = 0; a1 <= tp1; a1++)
      for (int a2 = 0; a2 <= tp2; a2++)
        for (int t = 0; t < 2; t++) {
          if (dp[a1][a2][i][t]) {
            for (int l = 0; l <= a1; l++)
              for (int k = 0; k <= a2; k++) {
                if ((l == 0 && k == 0) || (l * 50) + (k * 100) > maxk) continue;
                dp[tp1 - a1 + l][tp2 - a2 + k][i + 1][!t] +=
                    dp[a1][a2][i][t] * c[a1][l] % mod * c[a2][k] % mod;
                dp[tp1 - a1 + l][tp2 - a2 + k][i + 1][!t] %= mod;
              }
          }
        }
  for (int i = 0; i < 200; i++) {
    if (dp[tp1][tp2][i][1]) {
      cout << i << " " << dp[tp1][tp2][i][1] % mod << endl;
      return 0;
    }
  }
  cout << -1 << " " << 0 << endl;
}
