#include <bits/stdc++.h>
using namespace std;
const int base = 1e9 + 7;
struct Queue {
  int x50, x100, id;
  Queue() {}
  Queue(int _x50, int _x100, int _id) {
    x50 = _x50;
    x100 = _x100;
    id = _id;
  }
};
int n, m;
int n50, n100;
int f[55][55][2], cnt[55][55][2];
int c[55][55];
queue<Queue> q;
int main() {
  ios_base::sync_with_stdio(false);
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) {
    int x;
    scanf("%d", &x);
    if (x == 50)
      ++n50;
    else
      ++n100;
  }
  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]) % base;
  }
  memset(f, -1, sizeof f);
  f[n50][n100][0] = 0;
  cnt[n50][n100][0] = 1;
  q.push(Queue(n50, n100, 0));
  while ((int)q.size()) {
    int a = q.front().x50, b = q.front().x100, id = q.front().id;
    q.pop();
    for (int i = 0; i <= a; ++i)
      for (int j = 0; j <= b; ++j) {
        if (i == 0 && j == 0) continue;
        if (i * 50 + j * 100 > m) continue;
        int ta = n50 - a + i, tb = n100 - b + j;
        if (f[ta][tb][id ^ 1] == -1) {
          f[ta][tb][id ^ 1] = f[a][b][id] + 1;
          cnt[ta][tb][id ^ 1] = ((long long)cnt[a][b][id] * c[a][i]) % base;
          cnt[ta][tb][id ^ 1] =
              ((long long)cnt[ta][tb][id ^ 1] * c[b][j]) % base;
          q.push(Queue(ta, tb, id ^ 1));
        } else if (f[ta][tb][id ^ 1] == f[a][b][id] + 1) {
          long long sum = 0;
          sum = ((long long)cnt[a][b][id] * c[a][i]) % base;
          sum = ((long long)sum * c[b][j]) % base;
          cnt[ta][tb][id ^ 1] = (cnt[ta][tb][id ^ 1] + sum) % base;
        }
      }
  }
  printf("%d\n%d", f[n50][n100][1], cnt[n50][n100][1]);
  return 0;
}
