#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int MAXN = 60;
long long dis[MAXN][MAXN][2], way[MAXN][MAXN][2];
long long C[MAXN][MAXN];
int N, K;
struct node {
  int fif, hunrd;
  int op;
};
queue<node> q;
void init() {
  C[0][0] = C[1][0] = C[1][1] = 1;
  for (int i = 2; i < MAXN; i++) {
    C[i][0] = C[i][i] = 1;
    for (int j = 1; j < i; j++) C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % MOD;
  }
}
int main() {
  init();
  while (scanf("%d%d", &N, &K) != EOF) {
    int cnt50 = 0, cnt100 = 0;
    for (int i = 1; i <= N; i++) {
      int x;
      scanf("%d", &x);
      if (x == 50)
        cnt50++;
      else
        cnt100++;
    }
    memset(dis, 0, sizeof(dis));
    memset(way, 0, sizeof(way));
    dis[cnt50][cnt100][0] = 1;
    way[cnt50][cnt100][0] = 1;
    node u, s;
    u.fif = cnt50;
    u.hunrd = cnt100;
    u.op = 0;
    while (!q.empty()) q.pop();
    q.push(u);
    while (!q.empty()) {
      u = q.front();
      q.pop();
      for (int i = 0; i <= u.fif && i * 50 <= K; i++) {
        for (int j = 0; j <= u.hunrd && i * 50 + j * 100 <= K; j++) {
          if (i == 0 && j == 0) continue;
          s.fif = cnt50 - u.fif + i;
          s.hunrd = cnt100 - u.hunrd + j;
          s.op = u.op ^ 1;
          if (!dis[s.fif][s.hunrd][s.op]) {
            dis[s.fif][s.hunrd][s.op] = dis[u.fif][u.hunrd][u.op] + 1;
            q.push(s);
          }
          if (dis[s.fif][s.hunrd][s.op] == dis[u.fif][u.hunrd][u.op] + 1) {
            long long tmp = 1;
            tmp = (C[u.fif][i] * C[u.hunrd][j]) % MOD;
            tmp = tmp * way[u.fif][u.hunrd][u.op] % MOD;
            way[s.fif][s.hunrd][s.op] = (way[s.fif][s.hunrd][s.op] + tmp) % MOD;
          }
        }
      }
    }
    printf("%I64d\n%I64d\n", dis[cnt50][cnt100][1] - 1, way[cnt50][cnt100][1]);
  }
  return 0;
}
