#include <bits/stdc++.h>
const int M = 55;
long long dp[M * 4][M][M], C[M][M], A[M][M][M][M];
int main() {
  for (int i = 0; i < M; ++i)
    for (int j = C[i][0] = 1; j <= i; ++j)
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % 1000000007;
  for (int a = 0; a < M; ++a)
    for (int b = 0; b < M; ++b)
      for (int c = 0; c <= a; ++c)
        for (int d = 0; d <= b; ++d)
          A[a][b][c][d] = C[a][c] * C[b][d] % 1000000007;
  int n, k, X = 0, Y = 0;
  scanf("%d %d", &n, &k);
  for (int i = 0, a; i < n; ++i) scanf("%d", &a), ++(a == 50 ? X : Y);
  dp[0][X][Y] = 1;
  for (int i = 1; i <= 4 * n + 1; i += 2) {
    long long res = 0;
    for (int x = 0; x <= X; ++x)
      for (int y = 0; y <= Y; ++y)
        if (dp[i - 1][x][y])
          for (int a = 0; a <= x; ++a)
            for (int b = 0; b <= y; ++b)
              if ((a | b) && a * 50 + b * 100 <= k)
                (dp[i][x - a][y - b] += A[x][y][a][b] * dp[i - 1][x][y]) %=
                    1000000007;
    if (dp[i][0][0]) return printf("%d\n%lld\n", i, dp[i][0][0]), 0;
    for (int x = 0; x <= X; ++x)
      for (int y = 0; y <= Y; ++y)
        if (dp[i][x][y])
          for (int a = 0; a <= X - x; ++a)
            for (int b = 0; b <= Y - y; ++b)
              if ((a | b) && a * 50 + b * 100 <= k)
                (dp[i + 1][x + a][y + b] +=
                 A[X - x][Y - y][a][b] * dp[i][x][y]) %= 1000000007;
  }
  puts("-1\n0");
  return 0;
}
