#include <bits/stdc++.h>
using namespace std;
int dis[51][51][2];
int vis[51][51][2];
struct node {
  int f;
  int h;
  int side;
  int dis;
};
int a, b;
int n, k;
long long int ncr[51][51];
long long int ways[51][51][2];
long long int com(int a, int b) {
  if (b > a || a < 0) return 0;
  if (b == 0) return 1;
  if (ncr[a][b] != -1) return ncr[a][b];
  long long int ans = 0;
  ans = com(a - 1, b - 1) + com(a - 1, b);
  ans %= 1000000007;
  ncr[a][b] = ans;
  return ans;
}
long long int dfs(int a1, int b1, int c1, int d) {
  if (d == 0) return 1;
  if (ways[a1][b1][c1] != -1) return ways[a1][b1][c1];
  long long int ans = 0;
  if (c1 == 0) {
    for (int i = 0; i <= a1; i++) {
      for (int j = 0; j <= b1; j++) {
        if (i == a1 && j == b1) continue;
        if (((a1 - i) * 50 + (b1 - j) * 100) > k) continue;
        if (dis[i][j][1] == (d - 1)) {
          ans += ((com(a1, a1 - i) * com(b1, b1 - j)) % 1000000007) *
                 dfs(i, j, 1, d - 1);
          ans %= 1000000007;
        }
      }
    }
  } else {
    for (int i = a1; i <= a; i++) {
      for (int j = b1; j <= b; j++) {
        if (i == a1 && j == b1) continue;
        if (((-a1 + i) * 50 + (-b1 + j) * 100) > k) continue;
        if (dis[i][j][0] == (d - 1)) {
          ans += ((com(a - a1, i - a1) * com(b - b1, j - b1)) % 1000000007) *
                 dfs(i, j, 0, d - 1);
          ans %= 1000000007;
        }
      }
    }
  }
  ways[a1][b1][c1] = ans;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  for (int i = 0; i < 51; i++) {
    for (int j = 0; j < 51; j++) {
      ncr[i][j] = -1;
      ways[i][j][0] = -1;
      ways[i][j][1] = -1;
    }
  }
  cin >> n >> k;
  a = 0;
  b = 0;
  for (int i = 0; i < n; ++i) {
    int temp;
    cin >> temp;
    if (temp == 50)
      a++;
    else
      b++;
  }
  dis[0][0][1] = 0;
  queue<node> q;
  node temp;
  temp.f = 0;
  temp.h = 0;
  temp.side = 1;
  temp.dis = 0;
  q.push(temp);
  for (int i = 0; i < 51; i++) {
    for (int j = 0; j < 51; j++) {
      vis[i][j][0] = 0;
      vis[i][j][1] = 0;
      dis[i][j][0] = -1;
      dis[i][j][1] = -1;
    }
  }
  while (!q.empty()) {
    node t;
    t = q.front();
    q.pop();
    vis[t.f][t.h][t.side] = 1;
    dis[t.f][t.h][t.side] = t.dis;
    if (t.side == 0) {
      for (int i = t.f; i >= 0; i--) {
        for (int j = t.h; j >= 0; j--) {
          if (vis[i][j][1]) continue;
          if (i == t.f && j == t.h) continue;
          if (((t.f - i) * 50 + (t.h - j) * 100) > k) {
            break;
          }
          node temp;
          temp.f = i;
          temp.h = j;
          temp.side = 1;
          temp.dis = t.dis + 1;
          vis[temp.f][temp.h][temp.side] = 1;
          q.push(temp);
        }
      }
    } else {
      for (int i = t.f; i <= a; i++) {
        for (int j = t.h; j <= b; j++) {
          if (vis[i][j][0]) continue;
          if (i == t.f && j == t.h) continue;
          if (((-t.f + i) * 50 + (-t.h + j) * 100) > k) {
            break;
          }
          node temp;
          temp.f = i;
          temp.h = j;
          temp.side = 0;
          temp.dis = t.dis + 1;
          vis[temp.f][temp.h][temp.side] = 1;
          q.push(temp);
        }
      }
    }
  }
  if (dis[a][b][0] == -1) {
    cout << "-1" << endl;
    cout << "0" << endl;
    return 0;
  }
  cout << dis[a][b][0] << endl;
  cout << dfs(a, b, 0, dis[a][b][0]) << endl;
}
