#include <bits/stdc++.h>
using namespace std;
int F[55][55][2], G[55][55][2];
int Hash[55][55][2];
int C[55][55];
struct data {
  int x, y, fl;
} A[100005];
int main() {
  int n, m, i, j, k, l, n1 = 0, n2 = 0;
  C[1][1] = 1;
  C[1][0] = 1;
  C[0][0] = 1;
  for (i = 2; i <= 50; i++) {
    C[i][0] = 1;
    for (j = 1; j <= i; j++)
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % 1000000007;
  }
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) {
    scanf("%d", &j);
    if (j == 50)
      n1++;
    else
      n2++;
  }
  for (i = 0; i <= 50; i++)
    for (j = 0; j <= 50; j++)
      for (k = 0; k < 2; k++) F[i][j][k] = 1000000000;
  F[0][0][0] = 0;
  G[0][0][0] = 1;
  Hash[0][0][0] = 1;
  int head = 0, tail = 1;
  A[tail].x = 0;
  A[tail].y = 0;
  A[tail].fl = 0;
  do {
    head++;
    int x = A[head].x, y = A[head].y, fl = A[head].fl;
    if (fl == 0) {
      for (i = 0; i <= n1 - x; i++)
        for (j = 0; j <= n2 - y; j++)
          if (i * 50 + j * 100 <= m && (i || j)) {
            int tx = x + i, ty = y + j, tfl = fl ^ 1;
            if (F[tx][ty][tfl] > F[x][y][fl] + 1) {
              F[tx][ty][tfl] = F[x][y][fl] + 1;
              G[tx][ty][tfl] =
                  (((((long long)G[x][y][fl]) * C[n1 - x][i]) % 1000000007) *
                   C[n2 - y][j]) %
                  1000000007;
              if (!Hash[tx][ty][tfl]) {
                tail++;
                A[tail].x = tx;
                A[tail].y = ty;
                A[tail].fl = tfl;
                Hash[tx][ty][tfl] = 1;
              }
            } else if (F[tx][ty][tfl] == F[x][y][fl] + 1) {
              G[tx][ty][tfl] =
                  (G[tx][ty][tfl] +
                   (((((long long)G[x][y][fl]) * C[n1 - x][i]) % 1000000007) *
                    C[n2 - y][j]) %
                       1000000007) %
                  1000000007;
            }
          }
    } else {
      for (i = 0; i <= x; i++)
        for (j = 0; j <= y; j++)
          if (i * 50 + j * 100 <= m && (i || j)) {
            int tx = x - i, ty = y - j, tfl = fl ^ 1;
            if (F[tx][ty][tfl] > F[x][y][fl] + 1) {
              F[tx][ty][tfl] = F[x][y][fl] + 1;
              G[tx][ty][tfl] =
                  (((((long long)G[x][y][fl]) * C[x][i]) % 1000000007) *
                   C[y][j]) %
                  1000000007;
              if (!Hash[tx][ty][tfl]) {
                tail++;
                A[tail].x = tx;
                A[tail].y = ty;
                A[tail].fl = tfl;
                Hash[tx][ty][tfl] = 1;
              }
            } else if (F[tx][ty][tfl] == F[x][y][fl] + 1) {
              G[tx][ty][tfl] =
                  (G[tx][ty][tfl] +
                   (((((long long)G[x][y][fl]) * C[x][i]) % 1000000007) *
                    C[y][j]) %
                       1000000007) %
                  1000000007;
            }
          }
    }
  } while (head < tail);
  if (F[n1][n2][1] < 1000000000)
    printf("%d\n", F[n1][n2][1]);
  else
    printf("-1\n");
  printf("%d\n", G[n1][n2][1]);
  return 0;
}
