#include <bits/stdc++.h>
using namespace std;
long long n, k, c[240][240];
long long ways[240][60][60];
long long p, m1, m2, bmoves;
long reach[260][60][60];
long ml1, ml2;
long long remm, add;
long fitt[100][100];
long long prec[51][51][51][51];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  long long overfl = 1000000000;
  overfl *= overfl;
  overfl *= 7;
  for (int i = 0; i <= 50; i++)
    for (int j = 0; j <= 50; j++)
      if (i * 50 + j * 100 <= k) fitt[i][j] = 1;
  for (int i = 0; i <= 50; i++)
    for (int j = 0; j <= 50; j++) {
      if (j == 0)
        c[i][j] = 1;
      else
        c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % 1000000007;
    }
  for (int i = 0; i <= 50; i++)
    for (int j = 0; j <= i; j++)
      for (int q = 0; q <= 50; q++)
        for (int w = 0; w <= q; w++) {
          prec[i][j][q][w] = c[i][j] * c[q][w] % 1000000007;
        }
  for (int i = 1; i <= n; i++) {
    cin >> p;
    if (p == 50)
      m1++;
    else
      m2++;
  }
  ways[0][m1][m2] = 1;
  reach[0][m1][m2] = 1;
  bmoves = 100000;
  for (long long moves = 1; moves <= 200; moves++) {
    remm = moves % 2;
    for (int l1 = 0; l1 <= m1; l1++)
      for (int l2 = 0; l2 <= m2; l2++) {
        if (reach[moves - 1][l1][l2] == 0) continue;
        if (remm == 1) {
          ml1 = l1;
          ml2 = l2;
        } else {
          ml1 = m1 - l1;
          ml2 = m2 - l2;
        }
        for (int j = 0; j <= ml2; j++)
          if (j * 100 <= k)
            for (int i = 0; i <= ml1; i++)
              if (fitt[i][j])
                if (i + j > 0) {
                  add = prec[ml1][i][ml2][j];
                  add *= ways[moves - 1][l1][l2];
                  if (remm == 1) {
                    reach[moves][l1 - i][l2 - j] = 1;
                    ways[moves][l1 - i][l2 - j] += add;
                    if (ways[moves][l1 - i][l2 - j] > overfl)
                      ways[moves][l1 + i][l2 + j] %= 1000000007;
                  } else {
                    reach[moves][l1 + i][l2 + j] = 1;
                    ways[moves][l1 + i][l2 + j] += add;
                    if (ways[moves][l1 + i][l2 + j] > overfl)
                      ways[moves][l1 + i][l2 + j] %= 1000000007;
                  }
                }
      }
    for (int i = 0; i <= 50; i++)
      for (int j = 0; j <= 50; j++) ways[moves][i][j] %= 1000000007;
    if (reach[moves][0][0]) bmoves = min(bmoves, moves);
    if (bmoves < 1000) break;
  }
  if (bmoves > 1000)
    cout << -1 << endl << 0 << endl;
  else {
    cout << bmoves << endl;
    cout << ways[bmoves][0][0] << endl;
  }
  cin.get();
  cin.get();
  return 0;
}
