#include <bits/stdc++.h>
using namespace std;
const int N = 50 + 7;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e9 + 7;
const double eps = 1e-8;
const double PI = acos(-1);
int n, k, cnt[2];
int dp[N][N][2];
long long comb[N][N];
long long ans[N][N][2];
int main() {
  for (int i = 0; i < N; i++)
    for (int j = comb[i][0] = 1; j <= i; j++)
      comb[i][j] = (comb[i - 1][j - 1] + comb[i - 1][j]) % mod;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    if (x == 50)
      cnt[0]++;
    else
      cnt[1]++;
  }
  memset(dp, -1, sizeof(dp));
  queue<pair<pair<int, int>, int>> que;
  que.push(make_pair(make_pair(0, 0), 0));
  ans[0][0][0] = 1;
  dp[0][0][0] = 0;
  while (!que.empty()) {
    int x = que.front().first.first;
    int y = que.front().first.second;
    int op = que.front().second;
    que.pop();
    if (op) {
      for (int i = 0; i <= min(k / 50, x); i++) {
        int up = min(y, (k - i * 50) / 100);
        for (int j = 0; j <= up; j++) {
          if (!i && !j) continue;
          if (dp[x - i][y - j][0] == -1 ||
              dp[x - i][y - j][0] == dp[x][y][1] + 1) {
            if (dp[x - i][y - j][0] == -1)
              que.push(make_pair(make_pair(x - i, y - j), op ^ 1));
            dp[x - i][y - j][0] = dp[x][y][1] + 1;
            ans[x - i][y - j][0] =
                (ans[x - i][y - j][0] +
                 ans[x][y][1] * comb[x][i] % mod * comb[y][j] % mod) %
                mod;
          }
        }
      }
    } else {
      for (int i = 0; i <= min(k / 50, cnt[0] - x); i++) {
        int up = min(cnt[1] - y, (k - i * 50) / 100);
        for (int j = 0; j <= up; j++) {
          if (!i && !j) continue;
          if (dp[x + i][y + j][1] == -1 ||
              dp[x + i][y + j][1] == dp[x][y][0] + 1) {
            if (dp[x + i][y + j][1] == -1)
              que.push(make_pair(make_pair(x + i, y + j), op ^ 1));
            dp[x + i][y + j][1] = dp[x][y][0] + 1;
            ans[x + i][y + j][1] =
                (ans[x + i][y + j][1] + ans[x][y][0] * comb[cnt[0] - x][i] %
                                            mod * comb[cnt[1] - y][j] % mod) %
                mod;
          }
        }
      }
    }
  }
  if (dp[cnt[0]][cnt[1]][1] == -1) {
    puts("-1");
    puts("0");
  } else {
    printf("%d\n", dp[cnt[0]][cnt[1]][1]);
    printf("%lld\n", ans[cnt[0]][cnt[1]][1]);
  }
  return 0;
}
