#include <bits/stdc++.h>
using namespace std;
struct status {
  int r_1, r_2, boat;
  status(int _r_1, int _r_2, int _boat) {
    r_1 = _r_1, r_2 = _r_2, boat = _boat;
  }
};
int n, k, cnt_1, cnt_2;
long long int dp[55][55][2], c[55][55], w[55][55][2];
long long int dfs(int r1, int r2, int bt) {
  if (dp[r1][r2][bt]) return dp[r1][r2][bt];
  long long int res = 0ll;
  if (bt) {
  } else {
  }
  return dp[r1][r2][bt] = res;
}
void inline yutruli() {
  w[cnt_1][cnt_2][1] = 0;
  static queue<status> qu;
  static bool vis[55][55][2];
  qu.push(status(cnt_1, cnt_2, 1));
  vis[cnt_1][cnt_2][1] = 1;
  dp[cnt_1][cnt_2][1] = 1ll;
  while (qu.size()) {
    int r1 = qu.front().r_1, r2 = qu.front().r_2, bt = qu.front().boat;
    int pw = w[r1][r2][bt];
    long long int now = dp[r1][r2][bt];
    qu.pop();
    if (bt) {
      for (int i = 0; i <= r1 && i * 50 <= k; i++) {
        int n2 = min(r2, (k - 50 * i) / 100);
        for (int j = 0; j <= n2; j++)
          if (!vis[r1 - i][r2 - j][0] && i + j > 0) {
            w[r1 - i][r2 - j][0] = pw + 1;
            vis[r1 - i][r2 - j][0] = 1;
            dp[r1 - i][r2 - j][0] =
                (dp[r1 - i][r2 - j][0] + now * c[r1][i] * c[r2][j]) %
                1000000007;
            qu.push(status(r1 - i, r2 - j, 0));
          } else if (w[r1 - i][r2 - j][0] == pw + 1)
            dp[r1 - i][r2 - j][0] =
                (dp[r1 - i][r2 - j][0] + now * c[r1][i] * c[r2][j]) %
                1000000007;
      }
    } else {
      for (int i = 0; i + r1 <= cnt_1 && i * 50 <= k; i++) {
        int n2 = min(cnt_2 - r2, (k - 50 * i) / 100);
        for (int j = 0; j <= n2; j++)
          if (!vis[r1 + i][r2 + j][1] && i + j > 0) {
            w[r1 + i][r2 + j][1] = pw + 1;
            vis[r1 + i][r2 + j][1] = 1;
            dp[r1 + i][r2 + j][1] =
                (dp[r1 + i][r2 + j][1] +
                 now * c[cnt_1 - r1][i] * c[cnt_2 - r2][j]) %
                1000000007;
            qu.push(status(r1 + i, r2 + j, 1));
          } else if (w[r1 + i][r2 + j][1] == pw + 1)
            dp[r1 + i][r2 + j][1] =
                (dp[r1 + i][r2 + j][1] +
                 now * c[cnt_1 - r1][i] * c[cnt_2 - r2][j]) %
                1000000007;
      }
    }
  }
  if (!vis[0][0][0])
    printf("-1\n0\n");
  else {
    printf("%d\n", w[0][0][0]);
    printf("%I64d\n", dp[0][0][0]);
  }
}
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    int w;
    scanf("%d", &w);
    if (w == 50)
      cnt_1++;
    else
      cnt_2++;
  }
  c[0][0] = 1ll;
  for (int i = 1; i <= n; i++) c[i][0] = 1;
  for (int i = 1; i <= n; i++) {
    c[i][i] = c[i][0] = 1ll;
    for (int j = 1; j <= i - 1; j++)
      c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % 1000000007;
  }
  yutruli();
}
