Problem: 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

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <typename T>
using vec = vector<T>;
template <typename K, typename V>
using umap = unordered_map<K, V>;
template <typename K>
using uset = unordered_set<K>;
using vi = vec<int>;
using vl = vec<ll>;
using vpi = vec<pii>;
using vpl = vec<pll>;
using int128 = __int128_t;
using uint128 = __uint128_t;
template <typename I>
string intStr(I x) {
  string ret;
  while (x > 0) {
    ret += (x % 10) + '0';
    x /= 10;
  }
  reverse(ret.begin(), ret.end());
  return ret;
}
template <typename T>
inline void maxa(T& st, T v) {
  st = max(st, v);
}
template <typename T>
inline void mina(T& st, T v) {
  st = min(st, v);
}
inline void setprec(ostream& out, int prec) {
  out << setprecision(prec) << fixed;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T> iter) {
  out << "[";
  for (auto t : iter) {
    out << t << ", ";
  }
  out << "]";
  return out;
}
template <typename T>
string arrayStr(T* arr, int sz) {
  string ret = "[";
  for (int i = 0; i < sz; i++) {
    ret += to_string(arr[i]) + ", ";
  }
  return ret + "]";
}
template <typename T>
void printArray(T* arr, int sz) {
  for (int i = 0; i < sz; i++) {
    cout << arr[i] << " ";
  }
  cout << "\n";
}
inline void scan() {}
template <typename F, typename... R>
inline void scan(F& f, R&... r) {
  cin >> f;
  scan(r...);
}
template <typename F>
inline void println(F t) {
  cout << t << '\n';
}
template <typename F, typename... R>
inline void println(F f, R... r) {
  cout << f << " ";
  println(r...);
}
inline void print() {}
template <typename F, typename... R>
inline void print(F f, R... r) {
  cout << f;
  print(r...);
}
template <typename F>
inline string __generic_tostring(F f) {
  stringstream ss;
  ss << f;
  return ss.str();
}
template <typename F>
inline string __join_comma(F f) {
  return __generic_tostring(f);
}
template <typename F, typename... R>
string __join_comma(F f, R... r) {
  return __generic_tostring(f) + ", " + __join_comma(r...);
}
struct Ed {
  int i, v;
};
const int MN = 201, MM = MN * MN;
int N, M, deg[MN];
bool use[MM], vis[MN];
vec<Ed> g[MN];
vi oddVer;
void mark(int c) {
  if (vis[c]) return;
  vis[c] = true;
  if (deg[c] % 2) oddVer.push_back(c);
  for (auto to : g[c]) mark(to.v);
}
vpi dirs;
void dfsEuler(int c) {
  for (auto to : g[c]) {
    if (use[to.i]) continue;
    use[to.i] = true;
    if (to.i < M) dirs.emplace_back(c, to.v);
    dfsEuler(to.v);
  }
}
void solve() {
  for (__typeof(1) i = 1; i < N + 1; i++)
    for (auto to : g[i]) deg[to.v]++;
  int ans = 0;
  for (__typeof(1) i = 1; i < N + 1; i++) ans += deg[i] % 2 == 0;
  int ctr = M;
  for (__typeof(1) i = 1; i < N + 1; i++) {
    if (!vis[i]) {
      oddVer.clear();
      mark(i);
      for (int j = 0, sz = ((int)((oddVer).size())); j < sz; j += 2) {
        int id = ctr++;
        g[oddVer[j]].push_back({id, oddVer[j + 1]});
        g[oddVer[j + 1]].push_back({id, oddVer[j]});
        use[id] = false;
      }
      dfsEuler(i);
    }
  }
  println(ans);
  for (auto p : dirs) println(p.first, p.second);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T;
  cin >> T;
  while (T--) {
    scan(N, M);
    for (__typeof(0) i = 0; i < M; i++) {
      int a, b;
      scan(a, b);
      g[a].push_back({i, b});
      g[b].push_back({i, a});
    }
    fill(vis, vis + N + 1, false);
    fill(deg, deg + N + 1, 0);
    fill(use, use + M, false);
    dirs.clear();
    solve();
    for (__typeof(1) i = 1; i < N + 1; i++) g[i].clear();
  }
}