Problem: Alice got an array of length n as a birthday present once again! This is the third year in a row! 

And what is more disappointing, it is overwhelmengly boring, filled entirely with zeros. Bob decided to apply some changes to the array to cheer up Alice.

Bob has chosen m changes of the following form. For some integer numbers x and d, he chooses an arbitrary position i (1 ≤ i ≤ n) and for every j ∈ [1, n] adds x + d ⋅ dist(i, j) to the value of the j-th cell. dist(i, j) is the distance between positions i and j (i.e. dist(i, j) = |i - j|, where |x| is an absolute value of x).

For example, if Alice currently has an array [2, 1, 2, 2] and Bob chooses position 3 for x = -1 and d = 2 then the array will become [2 - 1 + 2 ⋅ 2,~1 - 1 + 2 ⋅ 1,~2 - 1 + 2 ⋅ 0,~2 - 1 + 2 ⋅ 1] = [5, 2, 1, 3]. Note that Bob can't choose position i outside of the array (that is, smaller than 1 or greater than n).

Alice will be the happiest when the elements of the array are as big as possible. Bob claimed that the arithmetic mean value of the elements will work fine as a metric.

What is the maximum arithmetic mean value Bob can achieve?

Input

The first line contains two integers n and m (1 ≤ n, m ≤ 10^5) — the number of elements of the array and the number of changes.

Each of the next m lines contains two integers x_i and d_i (-10^3 ≤ x_i, d_i ≤ 10^3) — the parameters for the i-th change.

Output

Print the maximal average arithmetic mean of the elements Bob can achieve.

Your answer is considered correct if its absolute or relative error doesn't exceed 10^{-6}.

Examples

Input

2 3
-1 3
0 0
-1 -4


Output

-2.500000000000000


Input

3 2
0 2
5 0


Output

7.000000000000000

Solution (in JAVA):

Solution:
//package aug;

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

public class EdRnd47
{
    InputStream is;
    PrintWriter out;
    String INPUT = "";
    //boolean codechef=true;
    boolean codechef=true;
    
	void solve()
	{/*
		//char[] a=ns().toCharArray();
		for(int q=1;q<=100;q++)
		{
			int n=20;
			char[] a=new char[n];
			Random r=new Random();
			for(int i=0;i<n;i++)
			{
				a[i]=(char) (r.nextInt(3)+'0');
			}
			//int n=a.length;
			int ch=0;
			int ind=0;
			char[] ans=new char[n];
			int ind2=0;
			while(ind<n)
			{
				int cnt0=0,cnt1=0;
				while(ind<n && (a[ind]=='0' ||a[ind]=='1'))
				{
					if(a[ind]=='0')cnt0++;
					else cnt1++;
					ind++;
				}
				for(int i=0;i<cnt0;i++)ans[ind2++]='0';
				for(int i=0;i<cnt1;i++)ans[ind2++]='1';
				cnt1=0;
				int cnt2=0;
				while(ind<n && (a[ind]=='2' ||a[ind]=='1'))
				{
					if(a[ind]=='1')cnt1++;
					else cnt2++;
					ind++;
				}
				for(int i=0;i<cnt1;i++)ans[ind2++]='1';
				for(int i=0;i<cnt2;i++)ans[ind2++]='2';
				//if(ind==n-1)break;
			}
			char[] c;
			brute(c=Arrays.copyOf(a, n), n);
			boolean br=false;
			for(int i=0;i<n;i++)
			{
				if(c[i]!=ans[i])
				{
					out.println(Arrays.toString(a));
					out.println(Arrays.toString(c));
					out.println(Arrays.toString(ans));
					br=true;break;
				}
			}
			if(br)break;
		}*/
		
		//out.println();
		int n=ni(),m=ni();
		long min=Long.MAX_VALUE;
		long max=Long.MIN_VALUE;
		int maxi=-1,mini=-1;
		for(int i=1;i<=n;i++)
		{
			long val1=i;
			val1=(val1*(val1-1))/2;
			long val2=n-i+1;
			val2=(val2*(val2-1))/2;
			if(val1+val2>max)
			{
				max=val1+val2;
				maxi=i;
			}
			if(val1+val2<min)
			{
				min=val1+val2;
				mini=i;
			}
		}
		long sum=0;
		for(int i=0;i<m;i++)
		{
			int x=ni(),d=ni();
			if(d<0)
			{
				sum+=(long)x*n+d*min;
			}
			else sum+=(long)x*n+d*max;
		}
		out.println((double)sum/n);
	}
	
	static void brute(char[] a,int n)
	{
		while(true)
		{
			boolean ch=true;
			for(int i=1;i<n;i++)
			{
				if(a[i]=='0' && a[i-1]=='1')
				{
					a[i]='1';
					a[i-1]='0';
				}
				else if(a[i]=='1' && a[i-1]=='2')
				{
					a[i]='2';
					a[i-1]='1';
				}
				else ch=false;
			}
			if(!ch)
			{
				break;
			}
		}
	}
	
	static void dfs(int[][] g,int u,int[] vis,int p)
	{
		vis[u]=p;
		for(int v:g[u])
		{
			if(vis[v]==0)dfs(g,v,vis,u);			
		}
	}
	
	static int[][] packD(int n, int[] from, int[] to) {
		int[][] g = new int[n][];
		int[] p = new int[n];
		for (int f : from)
			p[f]++;
		for (int i = 0; i < n; i++)
			g[i] = new int[p[i]];
		for (int i = 0; i < from.length; i++) {
			g[from[i]][--p[from[i]]] = to[i];
		}
		return g;
	}
    
    public boolean check(int[] cnt,int m)
    {
    	boolean ch=true;
    	for(int i=2;i<=m;i++)
		{
			if(cnt[i]>=cnt[1])
			{
				ch=false;break;
			}
		}
		return ch;
    }
    
    static class Pair
    {
        int a,b;
        public Pair(int a,int b)
        {
            this.a=a;
            this.b=b;
        }
    }
    
    static long lcm(int a,int b)
    {
        long val=a;
        val*=b;
        return (val/gcd(a,b));
    }
    
    static long gcd(long a,long b)
    {
        if(a==0)return b;
        return gcd(b%a,a);
    }
    
    static int pow(int a, int b, int p)
    {
        long ans = 1, base = a;
        while (b!=0)
        {
            if ((b & 1)!=0)
            {
                ans *= base;
                ans%= p;
            }
            base *= base;
            base%= p;
            b >>= 1;
        }
        return (int)ans;
    }

    static int inv(int x, int p)
    {
        return pow(x, p - 2, p);
    }

    
    void run() throws Exception
    {
        if(codechef)oj=true;
        is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        out = new PrintWriter(System.out);
        
        long s = System.currentTimeMillis();
        solve();
        out.flush();
        tr(System.currentTimeMillis()-s+"ms");
    }
    
    public static void main(String[] args) throws Exception {new EdRnd47().run();}
    
    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;
    
    private int readByte()
    {
        if(lenbuf == -1)throw new InputMismatchException();
        if(ptrbuf >= lenbuf){
            ptrbuf = 0;
            try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
            if(lenbuf <= 0)return -1;
        }
        return inbuf[ptrbuf++];
    }
    
    private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
    private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
    
    private double nd() { return Double.parseDouble(ns()); }
    private char nc() { return (char)skip(); }
    
    private String ns()
    {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    
    private char[] ns(int n)
    {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while(p < n && !(isSpaceChar(b))){
            buf[p++] = (char)b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }
    
    private char[][] nm(int n, int m)
    {
        char[][] map = new char[n][];
        for(int i = 0;i < n;i++)map[i] = ns(m);
        return map;
    }
    
    private int[] na(int n)
    {
        int[] a = new int[n];
        for(int i = 0;i < n;i++)a[i] = ni();
        return a;
    }
    
    private int ni()
    {
        int num = 0, b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }
        
        while(true){
            if(b >= '0' && b <= '9'){
                num = num * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }
    
    private long nl()
    {
        long num = 0;
        int b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }
        
        while(true){
            if(b >= '0' && b <= '9'){
                num = num * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }
    
    private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
    private void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}