#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int oo = 1e8;
struct node {
  int sad, pan, l, ban;
  bool mark;
  long long zar;
  node() { l = oo; }
} s[8000];
int n, tsad, tpan, k;
long long c[60][60];
void bfs(int st);
void pre_cal();
int main() {
  pre_cal();
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    if (t == 100) tsad++;
  }
  tpan = n - tsad;
  bfs(tsad * 51 + tpan);
  if (s[51 * 51].l == oo)
    cout << "-1\n0\n";
  else
    cout << s[51 * 51].l << '\n' << s[51 * 51].zar << '\n';
  return 0;
}
void bfs(int st) {
  queue<int> q;
  q.push(st);
  s[st].mark = true;
  s[st].l = 0;
  s[st].zar = 1;
  while (!q.empty()) {
    int f = q.front(), ban = f / (51 * 51);
    int gh = f - ban * 51 * 51, sad = gh / 51, pan = gh % 51;
    if (!ban) {
      for (int i = 0; i <= sad; i++)
        for (int j = 0; j <= pan; j++)
          if ((sad - i) * 100 + (pan - j) * 50 <= k)
            if (i != sad || j != pan) {
              int t = 51 * 51 + 51 * i + j;
              if (s[t].l >= s[f].l + 1) {
                s[t].l = s[f].l + 1;
                s[t].zar += s[f].zar * c[sad][i] % mod * c[pan][j] % mod;
                s[t].zar %= mod;
                if (!s[t].mark++) q.push(t);
              }
            }
    } else
      for (int i = 0; i <= tsad - sad; i++)
        for (int j = 0; j <= tpan - pan; j++)
          if ((i || j) && 100 * i + 50 * j <= k) {
            int t = (sad + i) * 51 + (pan + j);
            if (s[t].l >= s[f].l + 1) {
              s[t].l = s[f].l + 1;
              s[t].zar +=
                  s[f].zar * c[tsad - sad][i] % mod * c[tpan - pan][j] % mod;
              s[t].zar %= mod;
              if (!s[t].mark++) q.push(t);
            }
          }
    q.pop();
  }
}
void pre_cal() {
  for (int i = 0; i <= 50; i++) {
    c[i][0] = 1;
    for (int j = 1; j <= i; j++)
      c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % mod;
  }
}
