There are n cities and m two-way roads in Berland, each road connects two cities. It is known that there is no more than one road connecting each pair of cities, and there is no road which connects the city with itself. It is possible that there is no way to get from one city to some other city using only these roads.

The road minister decided to make a reform in Berland and to orient all roads in the country, i.e. to make each road one-way. The minister wants to maximize the number of cities, for which the number of roads that begins in the city equals to the number of roads that ends in it.

Input

The first line contains a positive integer t (1 ≤ t ≤ 200) — the number of testsets in the input.

Each of the testsets is given in the following way. The first line contains two integers n and m (1 ≤ n ≤ 200, 0 ≤ m ≤ n·(n - 1) / 2) — the number of cities and the number of roads in Berland. 

The next m lines contain the description of roads in Berland. Each line contains two integers u and v (1 ≤ u, v ≤ n) — the cities the corresponding road connects. It's guaranteed that there are no self-loops and multiple roads. It is possible that there is no way along roads between a pair of cities.

It is guaranteed that the total number of cities in all testset of input data doesn't exceed 200.

Pay attention that for hacks, you can only use tests consisting of one testset, so t should be equal to one.

Output

For each testset print the maximum number of such cities that the number of roads that begins in the city, is equal to the number of roads that ends in it.

In the next m lines print oriented roads. First print the number of the city where the road begins and then the number of the city where the road ends. If there are several answers, print any of them. It is allowed to print roads in each test in arbitrary order. Each road should be printed exactly once. 

Example

Input

2
5 5
2 1
4 5
2 3
1 3
3 5
7 2
3 7
4 2


Output

3
1 3
3 5
5 4
3 2
2 1
3
2 4
3 7
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.concurrent.TimeUnit;

public class e723 implements Runnable{
	
    public static void main(String[] args) {
    	try{
            new Thread(null, new e723(), "process", 1<<26).start();
        }
        catch(Exception e){
            System.out.println(e);
        }
    }
	public void run() {
		FastReader scan = new FastReader();
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
		//PrintWriter out = new PrintWriter("file.out");
		Task solver = new Task();
		int t = scan.nextInt();
		//int t = 1;
		for(int i = 1; i <= t; i++) solver.solve(i, scan, out);
		out.close();
	}

	static class Task {
		static final int oo = Integer.MAX_VALUE;
		static final long OO = Long.MAX_VALUE;

		List<List<Integer>> adj = new ArrayList<>();
		int[] nodes;
		PrintWriter out;
		public void solve(int testNumber, FastReader sc, PrintWriter o) {
			out = o;
			int n = sc.nextInt();
			int m = sc.nextInt();
			nodes = new int[n+1];
			adj.clear();
			for(int i = 0; i <= n; i++) {
				adj.add(new ArrayList<>());
			}
			for(int i = 0; i < m; i++) {
				int u = sc.nextInt();
				int v = sc.nextInt();
				nodes[u]++;
				nodes[v]++;
				adj.get(u).add(v);
				adj.get(v).add(u);
			}
			
			int count = 0;
			for(int i = 1; i <= n; i++)
				if(nodes[i] % 2 == 0)
					count++;
			out.println(count);
			
			// dfs from any odd nodes, until you hit another odd node.
			for(int i = 1; i <= n; i++) {
				if(nodes[i] % 2 == 1) {
					while(nodes[i] != 0) {
						int next = adj.get(i).get(0);
						adj.get(i).remove((Integer)next);
						adj.get(next).remove((Integer)i);
						
						out.println(i + " " + next);
						nodes[i]--;
						dfs(next);
					}
				}
			}
			
			// dfs from any leftover even nodes, until you hit an odd node (which can only be the node you started on, forming a cycle.
			for(int i = 1; i <= n; i++) {
				while(nodes[i] != 0) {
					int next = adj.get(i).get(0);
					adj.get(i).remove((Integer)next);
					adj.get(next).remove((Integer)i);
					
					out.println(i + " " + next);
					nodes[i]--;
					dfs(next);
				}
			}
		}
		
		public void dfs(int node) {
			if(nodes[node] % 2 == 1) {
				nodes[node]--;
				return;
			}
			int next = adj.get(node).get(0);
			adj.get(node).remove((Integer)next);
			adj.get(next).remove((Integer)node);
			
			out.println(node + " " + next);
			nodes[node]-=2;
			dfs(next);
		}
		
	}
	static long modInverse(long N, long MOD) {
		return binpow(N, MOD - 2, MOD);
	}
	static long modDivide(long a, long b, long MOD) {
		a %= MOD;
		return (binpow(b, MOD-2, MOD) * a) % MOD;
	}
	static long binpow(long a, long b, long m) {
		a %= m;
		long res = 1;
		while (b > 0) {
			if ((b & 1) == 1)
				res = res * a % m;
			a = a * a % m;
			b >>= 1;
		}
		return res;
	}
	static int[] reverse(int a[]) 
    { 
        int[] b = new int[a.length]; 
        for (int i = 0, j = a.length; i < a.length; i++, j--) { 
            b[j - 1] = a[i]; 
        } 
        
        return b;
    }
	static long[] reverse(long a[]) 
    { 
        long[] b = new long[a.length]; 
        for (int i = 0, j = a.length; i < a.length; i++, j--) { 
            b[j - 1] = a[i]; 
        } 
        
        return b;
    }
	
	static void shuffle(Object[] a) {
		Random get = new Random();
		for (int i = 0; i < a.length; i++) {
			int r = get.nextInt(a.length);
			Object temp = a[i];
			a[i] = a[r];
			a[r] = temp;
		}
	}
	
	static void sort(Object[] x){
		shuffle(x);
		Arrays.sort(x);
	}
	
	static class tup implements Comparable<tup>, Comparator<tup>{
		int a, b;
		tup(int a,int b){
			this.a=a;
			this.b=b;
		}
		public tup() {
		}
		@Override
		public int compareTo(tup o){
			return Integer.compare(b,o.b);
		}
		@Override
		public int compare(tup o1, tup o2) {
			return Integer.compare(o1.b, o2.b);
		}
		
		@Override
	    public int hashCode() {
			return Objects.hash(a, b);
	    }
 
	    @Override
	    public boolean equals(Object obj) {
	    	if (this == obj)
                return true;
	    	if (obj == null)
                return false;
	    	if (getClass() != obj.getClass())
                return false;
	    	tup other = (tup) obj;
	    	return a==other.a && b==other.b;
	    }
	    
	    @Override
	    public String toString() {
	    	return a + " " + b;
	    }
	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		public FastReader(String s) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(new File(s)));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
		
		int[] readArray(int size) {
			int[] a = new int[size];
			for(int i = 0; i < size; i++) {
				a[i] = nextInt();
			}
			return a;
		}
		
		long[] readLongArray(int size) {
			long[] a = new long[size];
			for(int i = 0; i < size; i++) {
				a[i] = nextLong();
			}
			return a;
		}
	}
	
	static void dbg(int[] arr) {
		System.out.println(Arrays.toString(arr));
	}
	static void dbg(long[] arr) {
		System.out.println(Arrays.toString(arr));
	}
	static void dbg(boolean[] arr) {
		System.out.println(Arrays.toString(arr));
	}

	static void dbg(Object... args) {
        for (Object arg : args)
            System.out.print(arg + " ");
        System.out.println();
    }
}