import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

public class Cascade {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;

        String line;
        while ((line = br.readLine()) != null) {
            String parts[] = line.split(" ");
            int count = Integer.parseInt(parts[0]);
            int flow = Integer.parseInt(parts[1]);
            List<Pond> ponds = new ArrayList<>(count);
            st = new StringTokenizer(br.readLine(), " ");
            for (int i = 0; i < count; i++) {
                Pond p = new Pond();
                p.i = i;
                p.c = Integer.parseInt(st.nextToken());
                p.F = flow;
                if (i > 0) {
                    ponds.get(i-1).next = p;
                    p.prev = ponds.get(i-1);
                }
                ponds.add(p);
            }

            Pond last = new Pond();
            Pond lastInRow = new Pond();
            PriorityQueue<Pond> pQue = new PriorityQueue<>(ponds);
            while (pQue.size() > 0) {
                last = pQue.poll();
                if (last.done) continue;
                if (last.i == count - 1) {
                    lastInRow = last;
                }
                last.done = true;
                if (last.prev != null) {
                    last.prev.next = last.next;
                }
                Pond next = last.next;
                if (next != null) {
                    last.next.update(last.getTime(), last.F);
                    pQue.add(next);
                    last.next.prev = last.prev;
                }
            }
            System.out.print(lastInRow.getTime());
            System.out.print(" ");
            System.out.print(last.getTime());
            System.out.println();
        }

        br.close();
    }

    private static class Pond implements Comparable<Pond>{
        public Pond prev;
        public Pond next;

        public double ecl;
        public double c;
        public double F;
        public int i;
        public boolean done = false;

        @Override
        public int compareTo(Pond o) {
            return (int)Math.signum(getTime() - o.getTime());
        }

        public double getTime() {
            return ecl + c/F;
        }

        public void update(double time, double f) {
            c -= (time-ecl)*F;
            ecl = time;
            F += f;
        }

        @Override
        public String toString() {
            return Double.toString(getTime()) + " " + i;
        }
    }
}
