#include <bits/stdc++.h>
using namespace std;
int one = 0;
const int MOD = 1000000007;
const int MAX = 55;
struct Tri {
  int a;
  int b;
  int c;
};
int arr[MAX];
bool v[MAX][MAX][2];
int dist[MAX][MAX][2];
int comb[MAX][MAX];
long long ways[MAX][MAX][2];
int main() {
  for (int i = 0; i < MAX; i++) {
    for (int j = 0; j < MAX; j++) {
      if (i == 0) {
        if (j == 0) {
          comb[i][j] = 1;
        } else {
          continue;
        }
      }
      if (j == 0) {
        comb[i][j] = 1;
      } else {
        comb[i][j] = (comb[i - 1][j - 1] + comb[i - 1][j]) % MOD;
      }
    }
  }
  int n, k;
  scanf("%d %d", &n, &k);
  k /= 50;
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
    arr[i] /= 50;
    if (arr[i] == 1) {
      one++;
    }
  };
  int two = n - one;
  queue<Tri> q;
  Tri st = {one, two, 0};
  q.push(st);
  v[st.a][st.b][st.c] = true;
  ways[st.a][st.b][st.c] = 1;
  while (!q.empty()) {
    Tri prev = q.front();
    q.pop();
    int l1;
    if (prev.c == 0) {
      l1 = prev.a + 1;
    } else {
      l1 = one - prev.a + 1;
    }
    int l2;
    if (prev.c == 0) {
      l2 = prev.b + 1;
    } else {
      l2 = two - prev.b + 1;
    }
    for (int i = 0; i < l1; i++) {
      for (int j = 0; j < l2; j++) {
        if (1 * i + 2 * j <= k && i + j > 0) {
          Tri newx;
          if (prev.c == 0) {
            newx = {prev.a - i, prev.b - j, 1};
          } else {
            newx = {prev.a + i, prev.b + j, 0};
          }
          if (!v[newx.a][newx.b][newx.c]) {
            v[newx.a][newx.b][newx.c] = true;
            ways[newx.a][newx.b][newx.c] =
                (((ways[prev.a][prev.b][prev.c] * comb[l1 - 1][i]) % MOD) *
                 comb[l2 - 1][j]) %
                MOD;
            dist[newx.a][newx.b][newx.c] = dist[prev.a][prev.b][prev.c] + 1;
            q.push(newx);
          } else {
            if (dist[newx.a][newx.b][newx.c] ==
                dist[prev.a][prev.b][prev.c] + 1) {
              ways[newx.a][newx.b][newx.c] +=
                  (((ways[prev.a][prev.b][prev.c] * comb[l1 - 1][i]) % MOD) *
                   comb[l2 - 1][j]) %
                  MOD;
            }
          }
        }
      }
    }
  }
  if (dist[0][0][1] == 0) {
    cout << -1 << endl << 0;
    return 0;
  }
  cout << dist[0][0][1] << endl << ways[0][0][1] % MOD << endl;
}
