#include <bits/stdc++.h>
using namespace std;
const int md = 1e9 + 7;
void Add(int &x, int y) {
  x += y;
  if (x >= md) x -= md;
}
int n, K;
int Cnt[2];
int C[55][55];
void Init() {
  for (int i = (0), i_END_ = (n); i <= i_END_; ++i) {
    C[i][i] = C[i][0] = 1;
    for (int j = (1), i_END_ = (i - 1); j <= i_END_; ++j)
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % md;
  }
}
int dp[2][55][55];
void Solve(int &cur) {
  cur ^= 1;
  for (int i = (0), i_END_ = (Cnt[0]); i <= i_END_; ++i)
    for (int j = (0), i_END_ = (Cnt[1]); j <= i_END_; ++j) dp[cur][i][j] = 0;
  for (int i = (0), i_END_ = (Cnt[0]); i <= i_END_; ++i)
    for (int j = (0), i_END_ = (Cnt[1]); j <= i_END_; ++j)
      if (dp[i][j]) {
        for (int x = (0), i_END_ = (i); x <= i_END_; ++x)
          for (int y = (0), i_END_ = (j); y <= i_END_; ++y)
            if ((x || y) && x + y * 2 <= K) {
              Add(dp[cur][Cnt[0] - i + x][Cnt[1] - j + y],
                  1ll * dp[cur ^ 1][i][j] * C[i][x] % md * C[j][y] % md);
            }
      }
}
int main() {
  scanf("%d%d", &n, &K);
  Init();
  K /= 50;
  int a;
  for (int i = (1), i_END_ = (n); i <= i_END_; ++i) {
    scanf("%d", &a);
    Cnt[0] += (a == 50);
    Cnt[1] += (a == 100);
  }
  int cur = 0;
  dp[cur][Cnt[0]][Cnt[1]] = 1;
  for (int i = (1), i_END_ = (n << 1); i <= i_END_; ++i) {
    Solve(cur);
    if (dp[cur][Cnt[0]][Cnt[1]]) {
      printf("%d\n%d\n", (i - 1) * 2 + 1, dp[cur][Cnt[0]][Cnt[1]]);
      return 0;
    }
    Solve(cur);
  }
  printf("-1\n0\n");
  return 0;
}
