import java.io.*;
import java.util.*;

public class Main {

    private  static void solver(InputReader sc, PrintWriter out) {
           int r = sc.nextInt();
           int a = sc.nextInt();
           int b = sc.nextInt();
           int x = sc.nextInt();
           int y = sc.nextInt();
           if(a==x && y==b){
               out.println("0");
               return;
           }
           long x1 = Math.abs(x-a);
           long y1 = Math.abs(y-b);
           x1 *= x1;
           y1 *= y1;
           long sum = x1+y1;
           double dis = Math.sqrt(sum);
           out.println(x1+" "+y1+" "+dis);
           long ans = (long)Math.ceil(dis/ (2 * r));
           out.println(ans);
    }

    public static void main(String[] args) throws Exception{
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        solver(in,out);
        out.close();
    }
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong(){
            return Long.parseLong(next());
        }

        public long[] readLongArr(int n){
            long arr[] = new long[n];
            for(int i=0; i<n; i++){
                arr[i] = nextLong();
            }
            return arr;
        }
        public int[] readIntArr(int n){
            int arr[] = new int[n];
            for(int i=0; i<n; i++){
                arr[i] = nextInt();
            }
            return arr;
        }
    }
}
class Pair{
    long x;
    boolean bool;
    Pair(long x, boolean bool){
        this.x = x;
        this.bool = bool;
    }
}