Problem: ICP city has an express company whose trucks run from the crossing S to the crossing T. The president of the company is feeling upset because all the roads in the city are one-way, and are severely congested. So, he planned to improve the maximum flow (edge disjoint paths) from the crossing S to the crossing T by reversing the traffic direction on some of the roads.

Your task is writing a program to calculate the maximized flow from S to T by reversing some roads, and the list of the reversed roads.



Input

The first line of a data set contains two integers N (2 \leq N \leq 300) and M (0 \leq M \leq {\rm min} (1\,000,\ N(N-1)/2)). N is the number of crossings in the city and M is the number of roads.

The following M lines describe one-way roads in the city. The i-th line (1-based) contains two integers X_i and Y_i (1 \leq X_i, Y_i \leq N, X_i \neq Y_i). X_i is the ID number (1-based) of the starting point of the i-th road and Y_i is that of the terminal point. The last line contains two integers S and T (1 \leq S, T \leq N, S \neq T, 1-based).

The capacity of each road is 1. You can assume that i \neq j implies either X_i \neq X_j or Y_i \neq Y_j, and either X_i \neq Y_j or X_j \neq Y_i.

Output

In the first line, print the maximized flow by reversing some roads. In the second line, print the number R of the reversed roads. In each of the following R lines, print the ID number (1-based) of a reversed road. You may not print the same ID number more than once.

If there are multiple answers which would give us the same flow capacity, you can print any of them.

Examples

Input

2 1
2 1
2 1


Output

1
0


Input

2 1
1 2
2 1


Output

1
1
1


Input

3 3
3 2
1 2
3 1
1 3


Output

2
2
1
3

Solution (in CPP):

Solution:
// clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define forever for (;;)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
template<typename A> using V = std::vector<A>;
template<typename A> using F = std::function<A>;
template<typename A, typename B> using P = std::pair<A, B>;
using pii = P<int, int>;
using vi = V<int>;
using vd = V<double>;
using vs = V<std::string>;
using vpii = V<pii>;
using vvi = V<vi>;
using vvpii = V<vpii>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = 3.14159265358979;
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int n) { return n & 1; }
constexpr bool even(const int n) { return ~n & 1; }
template<typename T> std::istream &operator>>(std::istream &is, std::vector<T> &v) { for (T &x : v) is >> x; return is; }
template<typename A, typename B> std::istream &operator>>(std::istream &is, std::pair<A, B> &p) { is >> p.first; is >> p.second; return is; }
using namespace std;
// clang-format on

using Flow = int;
struct FlowEdge {
  int src, dst;
  Flow cap;
  int id;
  bool dir;
  int rev;
  FlowEdge(const int s = 0, const int d = 0, const Flow c = 0, const int id = 0, const bool dir = false, const int r = 0) : src(s), dst(d), cap(c), id(id), dir(dir), rev(r) {}
};

using FlowEdges = std::vector<FlowEdge>;

class FlowGraph {
  std::vector<FlowEdges> g;
  using iterator = std::vector<FlowEdges>::iterator;
  using const_iterator = std::vector<FlowEdges>::const_iterator;

public:
  FlowGraph(const int size = 0) : g(size) {}
  size_t size() const { return g.size(); }
  FlowEdges &operator[](const int i) & { return g[i]; }

  void addEdge(const int src, const int dst, const int id, const Flow c = 1) {
    g[src].emplace_back(src, dst, c, id, true, g[dst].size());
    g[dst].emplace_back(dst, src, c, id, false, g[src].size() - 1);
  }
  iterator begin() { return g.begin(); }
  const_iterator begin() const { return g.begin(); }
  iterator end() { return g.end(); }
  const_iterator end() const { return g.end(); }
};

// Change it to 'FlowGraph &g' when you need a residual network
template<Flow inf = std::numeric_limits<Flow>::max() / 8> Flow dinic(FlowGraph &g, const int source, const int sink) {
  std::vector<int> level(g.size()), iter(g.size());
  auto bfs = [&] {
    std::fill(level.begin(), level.end(), -1);
    std::queue<int> q;
    level[source] = 0;
    q.push(source);
    while (q.size()) {
      int v = q.front();
      q.pop();
      for (auto &e : g[v]) {
        if (level[e.dst] >= 0 || e.cap <= 0) continue;
        level[e.dst] = level[v] + 1;
        q.push(e.dst);
      }
    }
    return level[sink] >= 0;
  };
  std::function<Flow(int, Flow)> dfs = [&](int v, Flow f) -> Flow {
    if (v == sink) return f;
    Flow s = 0;
    for (; iter[v] < g[v].size(); iter[v]++) {
      auto &e = g[v][iter[v]];
      if (level[v] >= level[e.dst] || e.cap <= 0) continue;
      Flow d = dfs(e.dst, min(f, e.cap));
      e.cap -= d;
      g[e.dst][e.rev].cap += d;
      s += d;
      f -= d;
      if (f == 0) break;
    }
    return s;
  };
  Flow s = 0;
  while (bfs()) {
    std::fill(iter.begin(), iter.end(), 0);
    s += dfs(source, inf);
  }
  return s;
}

main {
  int n, m;
  cin >> n >> m;
  FlowGraph g(n);
  rep(i, m) {
    int x, y;
    cin >> x >> y;
    g.addEdge(--x, --y, i + 1);
  }
  int s, t;
  cin >> s >> t;
  --s, --t;
  Flow f = dinic(g, s, t);
  vi v;
  for (auto &es : g) {
    for (auto &e : es) {
      if (e.cap < 1 && !e.dir) v.push_back(e.id);
    }
  }
  sort(all(v));
  cout << f << endl;
  cout << v.size() << endl;
  for (auto x : v) cout << x << endl;
}