#include <bits/stdc++.h>
using namespace std;
struct state {
  int l, h;
  bool left;
  state(int a, int b, bool c) {
    l = a;
    h = b;
    left = c;
  }
};
const int MOD = 1000000007;
const int MAXN = 55;
int n, k;
int light, heavy;
int dist[MAXN][MAXN][2];
int ways[MAXN][MAXN][2];
int choose[MAXN][MAXN];
int ADD(long long a, long long b) { return (a + b) % MOD; }
int MUL(long long a, long long b) { return a * b % MOD; }
void fillc() {
  for (int i = 0; i < MAXN; ++i) {
    choose[i][0] = 1;
    for (int j = 1; j < i; ++j) {
      choose[i][j] = ADD(choose[i - 1][j], choose[i - 1][j - 1]);
    }
    choose[i][i] = 1;
  }
}
void bfs() {
  for (int i = 0; i < MAXN; ++i)
    for (int j = 0; j < MAXN; ++j) dist[i][j][0] = dist[i][j][1] = -1;
  ways[light][heavy][1] = 1;
  dist[light][heavy][1] = 0;
  queue<state> to_visit;
  to_visit.push(state(light, heavy, true));
  while (!to_visit.empty()) {
    auto curr = to_visit.front();
    to_visit.pop();
    if (curr.left) {
      for (int lg = 0; lg <= k && lg <= curr.l; ++lg) {
        for (int hg = 0; hg <= curr.h && 2 * hg + lg <= k; ++hg) {
          if (lg || hg) {
            state nxt(curr.l - lg, curr.h - hg, false);
            if (dist[nxt.l][nxt.h][nxt.left] == -1) {
              dist[nxt.l][nxt.h][nxt.left] =
                  dist[curr.l][curr.h][curr.left] + 1;
              to_visit.push(nxt);
            }
            if (dist[nxt.l][nxt.h][nxt.left] ==
                dist[curr.l][curr.h][curr.left] + 1) {
              ways[nxt.l][nxt.h][nxt.left] =
                  ADD(ways[nxt.l][nxt.h][nxt.left],
                      MUL(ways[curr.l][curr.h][curr.left],
                          MUL(choose[curr.l][lg], choose[curr.h][hg])));
            }
          }
        }
      }
    } else {
      for (int lg = 0; lg <= k && lg <= light - curr.l; ++lg) {
        for (int hg = 0; hg <= heavy - curr.h && 2 * hg + lg <= k; ++hg) {
          if (lg || hg) {
            state nxt(curr.l + lg, curr.h + hg, true);
            if (dist[nxt.l][nxt.h][nxt.left] == -1) {
              dist[nxt.l][nxt.h][nxt.left] =
                  dist[curr.l][curr.h][curr.left] + 1;
              to_visit.push(nxt);
            }
            if (dist[nxt.l][nxt.h][nxt.left] ==
                dist[curr.l][curr.h][curr.left] + 1) {
              ways[nxt.l][nxt.h][nxt.left] =
                  ADD(ways[nxt.l][nxt.h][nxt.left],
                      MUL(ways[curr.l][curr.h][curr.left],
                          MUL(choose[light - curr.l][lg],
                              choose[heavy - curr.h][hg])));
            }
          }
        }
      }
    }
  }
}
int main() {
  scanf("%d%d", &n, &k);
  k /= 50;
  for (int i = 0; i < n; ++i) {
    int t;
    scanf("%d", &t);
    if (t == 100)
      heavy++;
    else
      light++;
  }
  fillc();
  bfs();
  printf("%d\n%d", dist[0][0][false], ways[0][0][false]);
}
