#include <bits/stdc++.h>
using namespace std;
int dis[60][60][2];
long long ans[60][60][2];
bool inque[60][60][2];
int n, k, f, t;
const int inf = 1e6;
const int mod = 1000000007;
pair<pair<int, int>, int> make_pair(int x, int y, int i) {
  return make_pair(make_pair(x, y), i);
}
int c[60][60];
int C(int n, int m) {
  if (c[n][m] != 0) return c[n][m];
  if (n == m || m == 0) return c[n][m] = 1;
  return c[n][m] = (C(n - 1, m) + C(n - 1, m - 1)) % mod;
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i(1); i <= n; ++i) {
    int tmp;
    scanf("%d", &tmp);
    if (tmp == 50)
      ++f;
    else
      ++t;
  }
  for (int i(0); i <= 50; ++i) {
    for (int j(0); j <= 50; ++j) {
      for (int k(0); k <= 1; ++k) {
        dis[i][j][k] = inf;
      }
    }
  }
  dis[0][0][1] = 0;
  queue<pair<pair<int, int>, int> > q;
  q.push(make_pair(0, 0, 1));
  inque[0][0][1] = true;
  while (!q.empty()) {
    int x = q.front().first.first, y = q.front().first.second,
        bk = q.front().second;
    if (bk) {
      for (int i(0); i <= f - x; ++i) {
        if (i * 50 > k) break;
        for (int j(0); j <= t - y; ++j) {
          if (i * 50 + j * 100 > k) break;
          if (i + j == 0) continue;
          int tx = x + i, ty = y + j;
          if (dis[tx][ty][0] > dis[x][y][1] + 1) {
            dis[tx][ty][0] = dis[x][y][1] + 1;
            if (!inque[tx][ty][0]) {
              inque[tx][ty][0] = true;
              q.push(make_pair(tx, ty, 0));
            }
          }
        }
      }
    } else {
      for (int i(0); i <= x; ++i) {
        if (i * 50 > k) break;
        for (int j(0); j <= y; ++j) {
          if (i * 50 + j * 100 > k) break;
          if (i + j == 0) continue;
          int tx = x - i, ty = y - j;
          if (dis[tx][ty][1] > dis[x][y][0] + 1) {
            dis[tx][ty][1] = dis[x][y][0] + 1;
            if (!inque[tx][ty][1]) {
              inque[tx][ty][1] = true;
              q.push(make_pair(tx, ty, 1));
            }
          }
        }
      }
    }
    q.pop();
    inque[x][y][bk] = false;
  }
  if (dis[f][t][0] >= 1000) {
    printf("-1\n0\n");
  } else {
    printf("%d\n", dis[f][t][0]);
    q.push(make_pair(0, 0, 1));
    ans[0][0][1] = 1;
    inque[0][0][1] = true;
    while (!q.empty()) {
      int x = q.front().first.first, y = q.front().first.second,
          bk = q.front().second;
      if (bk) {
        for (int i(0); i <= f - x; ++i) {
          if (i * 50 > k) break;
          for (int j(0); j <= t - y; ++j) {
            if (i * 50 + j * 100 > k) break;
            if (i + j == 0) continue;
            int tx = x + i, ty = y + j;
            if (dis[tx][ty][0] == dis[x][y][1] + 1) {
              ans[tx][ty][0] +=
                  ((ans[x][y][1] * C(f - x, i)) % mod * C(t - y, j)) % mod;
              ans[tx][ty][0] %= mod;
              if (!inque[tx][ty][0]) {
                q.push(make_pair(tx, ty, 0));
                inque[tx][ty][0] = true;
              }
            }
          }
        }
      } else {
        for (int i(0); i <= x; ++i) {
          if (i * 50 > k) break;
          for (int j(0); j <= y; ++j) {
            if (i * 50 + j * 100 > k) break;
            if (i + j == 0) continue;
            int tx = x - i, ty = y - j;
            if (dis[tx][ty][1] == dis[x][y][0] + 1) {
              ans[tx][ty][1] +=
                  ((ans[x][y][0] * C(x, i)) % mod * C(y, j)) % mod;
              ans[tx][ty][1] %= mod;
              if (!inque[tx][ty][1]) {
                q.push(make_pair(tx, ty, 1));
                inque[tx][ty][1] = true;
              }
            }
          }
        }
      }
      q.pop();
    }
    cout << ans[f][t][0] << endl;
  }
  return 0;
}
