#include <bits/stdc++.h>
using namespace std;
long long int mod(long long int a) { return a % 1000000007; }
int main() {
  long long int binom[51][51];
  for (int i = 0; i <= 50; i++) {
    binom[i][0] = 1;
  }
  for (int i = 1; i <= 50; i++) {
    for (int j = 1; j <= i; j++) {
      binom[i][j] = mod(binom[i - 1][j - 1] + binom[i - 1][j]);
    }
  }
  int n;
  int k;
  int tmp;
  cin >> n >> k;
  k = k / 50;
  int slim = 0;
  int fat = 0;
  for (int i = 0; i < n; i++) {
    cin >> tmp;
    if (tmp == 50) {
      slim++;
    } else {
      fat++;
    }
  }
  long long int res[201][slim + 1][fat + 1];
  for (int i = 0; i <= 200; i++) {
    for (int j = 0; j <= slim; j++) {
      for (int l = 0; l <= fat; l++) {
        res[i][j][l] = 0;
      }
    }
  }
  res[0][slim][fat] = 1;
  for (int step = 0; step < 200; step++) {
    for (int i = 0; i <= slim; i++) {
      for (int j = 0; j <= fat; j++) {
        if (step % 2 == 0) {
          for (int x = 0; x <= i; x++) {
            for (int y = 0; y <= j; y++) {
              if (x + y > 0 && x + 2 * y <= k) {
                res[step + 1][i - x][j - y] =
                    mod(res[step + 1][i - x][j - y] +
                        res[step][i][j] * binom[i][x] * binom[j][y]);
              }
            }
          }
        } else {
          for (int x = 0; x <= slim - i; x++) {
            for (int y = 0; y <= fat - j; y++) {
              if (x + y > 0 && x + 2 * y <= k) {
                res[step + 1][i + x][j + y] = mod(
                    res[step + 1][i + x][j + y] +
                    res[step][i][j] * binom[slim - i][x] * binom[fat - j][y]);
              }
            }
          }
        }
      }
    }
  }
  int cnt = 1;
  while (cnt < 200 && res[cnt][0][0] == 0) {
    cnt = cnt + 2;
  }
  if (cnt > 200) {
    cout << "-1" << endl << "0";
  } else {
    cout << cnt << endl << res[cnt][0][0];
  }
}
