#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int n, k, P, Q;
pair<int, int> dp[2][51][51][51][51];
queue<int> que;
void push(int side, int lP, int lQ, int rP, int rQ) {
  que.push(side);
  que.push(lP);
  que.push(lQ);
  que.push(rP);
  que.push(rQ);
}
void pop(int &side, int &lP, int &lQ, int &rP, int &rQ) {
  side = que.front();
  que.pop();
  lP = que.front();
  que.pop();
  lQ = que.front();
  que.pop();
  rP = que.front();
  que.pop();
  rQ = que.front();
  que.pop();
}
void add(int &x, int v) { x = (x + v) % MOD; }
void test(int side, int lP, int lQ, int rP, int rQ, int step, int cnt) {
  if (!dp[side][lP][lQ][rP][rQ].first) {
    dp[side][lP][lQ][rP][rQ] = make_pair(step, cnt);
    push(side, lP, lQ, rP, rQ);
  } else if (dp[side][lP][lQ][rP][rQ].first == step) {
    add(dp[side][lP][lQ][rP][rQ].second, cnt);
  }
}
long long C[55][55];
int main(void) {
  scanf("%d%d", &n, &k);
  C[0][0] = 1;
  for (int i = 1; i <= 50; i++) {
    C[i][0] = 1;
    for (int j = 1; j <= i; j++)
      C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % MOD;
  }
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    if (x == 50)
      ++P;
    else
      ++Q;
  }
  k /= 50;
  push(0, P, Q, 0, 0);
  dp[0][P][Q][0][0] = make_pair(1, 1);
  while (!que.empty()) {
    int side, lP, lQ, rP, rQ;
    pop(side, lP, lQ, rP, rQ);
    pair<int, int> &state = dp[side][lP][lQ][rP][rQ];
    if (side == 0) {
      for (int x = 0; x <= lP; x++)
        for (int y = 0; y <= lQ && x + 2 * y <= k; y++)
          if (x || y)
            test(!side, lP - x, lQ - y, rP + x, rQ + y, state.first + 1,
                 state.second * C[lP][x] % MOD * C[lQ][y] % MOD);
    } else {
      for (int x = 0; x <= rP; x++)
        for (int y = 0; y <= rQ && x + 2 * y <= k; y++)
          if (x || y)
            test(!side, lP + x, lQ + y, rP - x, rQ - y, state.first + 1,
                 state.second * C[rP][x] % MOD * C[rQ][y] % MOD);
    }
  }
  printf("%d\n%d\n", dp[1][0][0][P][Q].first - 1, dp[1][0][0][P][Q].second);
  return 0;
}
