#include <bits/stdc++.h>
using namespace std;
int n, k, _50 = 0, _100 = 0, tmp;
int min(int a, int b) { return (a > b) ? b : a; }
long long int mod = 1000000007;
long long int C[52][52];
long long int dp[250][51][51][2];
long long int w_dp(int tu, int __50, int __100, int pos) {
  if (tu == 0) return 0;
  dp[tu][__50][__100][pos] = 0;
  if (pos == 0)
    for (int i = 0; i <= __100; i++) {
      if (i * 2 > k) break;
      for (int e = 0; e <= __50; e++) {
        if (i * 2 + e > k) break;
        if (i + e == 0) continue;
        if (dp[tu - 1][__50 - e][__100 - i][1] == -1)
          dp[tu][__50][__100][pos] +=
              (((C[_100 - __100 + i][i] * C[_50 - __50 + e][e]) % mod) *
               w_dp(tu - 1, __50 - e, __100 - i, 1)) %
              mod;
        else
          dp[tu][__50][__100][pos] +=
              (((C[_100 - __100 + i][i] * C[_50 - __50 + e][e]) % mod) *
               dp[tu - 1][__50 - e][__100 - i][1]) %
              mod;
        dp[tu][__50][__100][pos] %= mod;
      }
    }
  else
    for (int i = 0; i <= _100 - __100; i++) {
      if (i * 2 > k) break;
      for (int e = 0; e <= _50 - __50; e++) {
        if (i * 2 + e > k) break;
        if (i + e == 0) continue;
        if (dp[tu - 1][__50 + e][__100 + i][0] == -1)
          dp[tu][__50][__100][pos] +=
              (((C[__100 + i][i] * C[__50 + e][e]) % mod) *
               w_dp(tu - 1, __50 + e, __100 + i, 0)) %
              mod;
        else
          dp[tu][__50][__100][pos] +=
              (((C[__100 + i][i] * C[__50 + e][e]) % mod) *
               dp[tu - 1][__50 + e][__100 + i][0]) %
              mod;
        dp[tu][__50][__100][pos] %= mod;
      }
    }
  return dp[tu][__50][__100][pos];
}
int main() {
  cin >> n >> k;
  k /= 50;
  for (int i = 0; i < n; i++) {
    cin >> tmp;
    if (tmp == 50)
      _50++;
    else
      _100++;
  }
  for (int i = 0; i <= 159; i++) {
    for (int e = 0; e <= _50; e++) {
      for (int j = 0; j <= _100; j++) {
        for (int g = 0; g < 2; g++) {
          dp[i][e][j][g] = -1;
        }
      }
    }
  }
  C[0][0] = 1;
  C[1][0] = 1;
  C[1][1] = 1;
  for (int i = 2; i <= 50; i++) {
    C[i][0] = 1;
    for (int e = 1; e < i; e++) {
      C[i][e] = (C[i - 1][e - 1] + C[i - 1][e]) % mod;
    }
    C[i][i] = 1;
  }
  dp[0][_50][_100][0] = 1;
  for (int i = 1; i < 160; i += 2) {
    w_dp(i, 0, 0, 1);
    if (dp[i][0][0][1] != 0) {
      cout << i << endl << dp[i][0][0][1] << endl;
      return 0;
    }
  }
  cout << -1 << endl << 0 << endl;
}
