#include <bits/stdc++.h>
using namespace std;
const int MAXN = 55, MAXT = 205, MOD = 1e9 + 7;
long long dp[MAXT][MAXN][MAXN], c[MAXN][MAXN];
int c50, c100, k, n;
void upd(int a, int b, int lv) {
  for (int i = 0; i <= a; i++)
    for (int j = 0; j <= b; j++) {
      if (i * 50 + j * 100 > k) break;
      if (i + j == 0) continue;
      dp[lv + 1][c50 - a + i][c100 - b + j] +=
          (dp[lv][a][b] * (c[a][i] * c[b][j]) % MOD) % MOD;
      dp[lv + 1][c50 - a + i][c100 - b + j] %= MOD;
    }
}
int main() {
  cin >> n >> k;
  for (int i = 0; i <= n; i++) c[i][0] = 1;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      c[i][j] = c[i - 1][j] + c[i - 1][j - 1], c[i][j] %= MOD;
  ;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    if (t == 50)
      c50++;
    else
      c100++;
  }
  dp[0][c50][c100] = 1;
  for (int i = 0; i < MAXT - 2; i++)
    for (int a = 0; a <= c50; a++)
      for (int b = 0; b <= c100; b++)
        if (dp[i][a][b] != 0) upd(a, b, i);
  for (int i = 1; i < MAXT; i += 2) {
    if (dp[i][c50][c100] > 0) return cout << i << '\n' << dp[i][c50][c100], 0;
  }
  cout << -1 << '\n' << 0;
}
