分别模拟求出最大最小值即可
from sys import stdin, stdout
def main():
input = stdin.readline
n,x = map(int,input().split())
if n == 1:
print("0 0")
return
l = [int(i) for i in input().split()]
cntmax = 0
cntmin = 0
# cntmax
if l[0] != -999:
start = l[0]
else:
start = 50
for i in range(1,n):
if l[i] != -999:
if start-l[i] >= x:
cntmax += 1
start = l[i]
else:
if start-x>= -50:
start -= x
cntmax += 1
else:
start = 50
# cntmin
if l[0] != -999:
start = l[0]
else:
start = -50
for i in range(1,n):
if l[i] != -999:
if start-l[i] >= x:
cntmin += 1
start = l[i]
else:
start = max(-50,start - x + 1)
print(cntmax,cntmin)
if __name__ == "__main__":
main()