#include <bits/stdc++.h>
using namespace std;
int n, m, cnt1, cnt2;
long long c[55][55];
struct node {
  int x;
  int y;
  int ct;
  node(int u, int v, int va) {
    x = u;
    y = v;
    ct = va;
  }
};
long long dp[55][55][2], d[55][55][2];
long long max(long long xx, long long yy) { return xx > yy ? xx : yy; }
void bfs() {
  memset(dp, -1, sizeof(dp));
  memset(d, 0, sizeof(d));
  dp[cnt1][cnt2][0] = 0;
  d[cnt1][cnt2][0] = 1;
  queue<node> q;
  q.push(node(cnt1, cnt2, 0));
  int a, b, t;
  long long ans = 0;
  while (!q.empty()) {
    node tt = q.front();
    a = tt.x;
    b = tt.y;
    t = tt.ct;
    if (a == cnt1 && b == cnt2 && t == 1) ans = max(ans, d[0][0][1]);
    q.pop();
    if (t == 0) {
      for (int i = 0; i <= a; i++)
        for (int j = 0; j <= b; j++) {
          if (i + j == 0 || i * 50 + j * 100 > m) continue;
          if (dp[a - i][b - j][1] == -1) {
            dp[a - i][b - j][1] = dp[a][b][0] + 1;
            d[a - i][b - j][1] =
                (((d[a][b][0] * c[a][i]) % 1000000007) * c[b][j]) % 1000000007;
            q.push(node(cnt1 - a + i, cnt2 - b + j, 1));
          } else if (dp[a - i][b - j][1] > dp[a][b][0] + 1) {
            dp[a - i][b - j][1] = dp[a][b][0] + 1;
            d[a - i][b - j][1] =
                (((d[a][b][0] * c[a][i]) % 1000000007) * c[b][j]) % 1000000007;
            q.push(node(cnt1 - a + i, cnt2 - b + j, 1));
          } else if (dp[a - i][b - j][1] == dp[a][b][0] + 1) {
            d[a - i][b - j][1] =
                (d[a - i][b - j][1] +
                 ((d[a][b][0] * c[a][i]) % 1000000007) * c[b][j]) %
                1000000007;
          }
        }
      d[a][b][0] = 0;
    } else if (t == 1) {
      for (int i = 0; i <= a; i++)
        for (int j = 0; j <= b; j++) {
          if (i + j == 0 || 50 * i + 100 * j > m) continue;
          if (dp[cnt1 - a + i][cnt2 - b + j][0] == -1) {
            dp[cnt1 - a + i][cnt2 - b + j][0] = dp[cnt1 - a][cnt2 - b][1] + 1;
            d[cnt1 - a + i][cnt2 - b + j][0] =
                (((d[cnt1 - a][cnt2 - b][1] * c[a][i]) % 1000000007) *
                 c[b][j]) %
                1000000007;
            q.push(node(cnt1 - a + i, cnt2 - b + j, 0));
          } else if (dp[cnt1 - a + i][cnt2 - b + j][0] >
                     dp[cnt1 - a][cnt2 - b][1] + 1) {
            dp[cnt1 - a + i][cnt2 - b + j][0] = dp[cnt1 - a][cnt2 - b][1] + 1;
            d[cnt1 - a + i][cnt2 - b + j][0] =
                (((d[cnt1 - a][cnt2 - b][1] * c[a][i]) % 1000000007) *
                 c[b][j]) %
                1000000007;
            q.push(node(cnt1 - a + i, cnt2 - b + j, 0));
          } else if (dp[cnt1 - a + i][cnt2 - b + j][0] ==
                     dp[cnt1 - a][cnt2 - b][1] + 1) {
            d[cnt1 - a + i][cnt2 - b + j][0] =
                (d[cnt1 - a + i][cnt2 - b + j][0] +
                 ((d[cnt1 - a][cnt2 - b][1] * c[a][i]) % 1000000007) *
                     c[b][j]) %
                1000000007;
          }
        }
      d[cnt1 - a][cnt2 - b][1] = 0;
    }
  }
  if (dp[0][0][1] == -1)
    printf("-1\n0\n");
  else
    printf("%I64d\n%I64d\n", dp[0][0][1], ans);
}
int x;
int main() {
  memset(c, 0, sizeof(c));
  c[1][1] = 1;
  c[1][0] = 1;
  c[0][0] = 1;
  for (int i = 2; i <= 51; i++)
    for (int j = 0; j <= i; j++) {
      if (j == 1)
        c[i][j] = i;
      else if (j == 0)
        c[i][j] = 1;
      else
        c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % 1000000007;
    }
  while (scanf("%d%d", &n, &m) == 2) {
    cnt1 = cnt2 = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &x);
      if (x == 50)
        cnt1++;
      else
        cnt2++;
    }
    bfs();
  }
  return 0;
}
