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:
#define _CRT_SECURE_NO_WARNINGS
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
#define all(c) (c).begin(), (c).end()
#define loop(i,a,b) for(ll i=a; i<ll(b); i++)
#define rep(i,b) loop(i,0,b)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
template<class T> ostream & operator<<(ostream & os, vector<T> const &);
template<int n, class...T> typename enable_if<(n>=sizeof...(T))>::type _ot(ostream &, tuple<T...> const &){}
template<int n, class...T> typename enable_if<(n< sizeof...(T))>::type _ot(ostream & os, tuple<T...> const & t){ os << (n==0?"":" ") << get<n>(t); _ot<n+1>(os, t); }
template<class...T> ostream & operator<<(ostream & os, tuple<T...> const & t){ _ot<0>(os, t); return os; }
template<class T, class U> ostream & operator<<(ostream & os, pair<T,U> const & p){ return os << "(" << p.first << ", " << p.second << ") "; }
template<class T> ostream & operator<<(ostream & os, vector<T> const & v){ rep(i,v.size()) os << v[i] << (i+1==(int)v.size()?"":" "); return os; }
#ifdef DEBUG
#define dump(...) (cerr<<#__VA_ARGS__<<" = "<<mt(__VA_ARGS__)<<" ["<<__LINE__<<"]"<<endl)
#else
#define dump(...)
#endif

int const inf = 1<<29;
struct Dinic {
public:
    typedef int Capacity;
    struct Edge;
    int n;
    vector<vector<Edge> > g;
    vector<int> level, iter;

    struct Edge {
        int dst;
        Capacity cap, cap_orig;
        int revEdge;
        bool isRev;
        bool isRev2;
        int id;
        Edge(int dst_, Capacity cap_, int revEdge_, bool isRev_, bool isRev2_, int id_)
            :dst(dst_), cap(cap_), cap_orig(cap_), revEdge(revEdge_), isRev(isRev_), isRev2(isRev2_), id(id_) {
        }
    };

    Dinic(int n_)
        : n(n_), g(vector<vector<Edge> >(n_)), level(n_), iter(n_) {}

    void add_edge(int src, int dst, Capacity cap, bool isRev2, int id){
        g[src].emplace_back(Edge(dst, cap, g[dst].size(), false, isRev2, id));
        g[dst].emplace_back(Edge(src, 0, g[src].size() - 1, true, isRev2, id));
    }

    // src->dstへの最大フローを流す
    Capacity solve(int src, int dst) {
        int flow = 0;
        while(1){
            bfs(src);
            if (level[dst] < 0) return flow;
            fill(all(iter), 0);
            int f;
            while ((f = dfs(src, dst, inf)) > 0) {
                flow += f;
            }
        }
    }

private:
    void bfs(int s) {
        level.assign(n,-1);
        queue<int> q; // 辺の数でみた最短距離
        level[s] = 0;
        q.push(s);
        while (q.size()) {
            int v = q.front(); q.pop();
            rep(i,g[v].size()){
                Edge& e = g[v][i];
                if (e.cap > 0 && level[e.dst] < 0) {
                    level[e.dst] = level[v] + 1;
                    q.push(e.dst);
                }
            }
        }
    }

    Capacity dfs(int v, int t, int f) {
        if (v == t) return f;
        for (int &i = iter[v]; i < (int)g[v].size(); i++) {
            Edge &e = g[v][i];
            if (e.cap > 0 && level[v] < level[e.dst]) {
                int d = dfs(e.dst, t, min(f, e.cap));
                if (d > 0) {
                    e.cap -= d;
                    g[e.dst][e.revEdge].cap += d;
                    return d;
                }
            }
        }
        return 0;
    }

public:
    // 現在の容量を表示
    // フローを流した分だけ破壊的に容量が減る実装になっている
    void view(){
        rep(i,g.size()){
            rep(j,g[i].size()){
                Edge & e=g[i][j];
                if(!e.isRev) printf("%3d->%3d (flow:%d)\n", (int)i, e.dst, e.cap);
            }
        }
    }

    // 流れたフロー=元々の容量-現在の容量を表示
    void view_flow(){
        rep(i,g.size()){
            rep(j,g[i].size())if(!g[i][j].isRev){
                Edge& e = g[i][j];
                printf("%3d->%3d (flow:%d)\n", (int)i, e.dst, e.cap_orig - e.cap);
            }
        }
    }

    void doit(){
        vector<int> ans;
        rep(i,g.size()){
            rep(j,g[i].size()){
                if(!g[i][j].isRev && g[i][j].isRev2 && g[i][j].cap==0){
                    ans.pb(g[i][j].id);
                }
            }
        }
        cout << ans.size() << endl;
        rep(i,ans.size()){
            cout << ans[i] << endl;
        }
    }
};

int main(){
    int n,m;
    while(cin >> n >> m){
        Dinic g(n);
        rep(i,m){
            int x,y; cin >> x >> y;
            x--; y--;
            g.add_edge(x,y,1,false,i+1);
            g.add_edge(y,x,1,true,i+1);
        }
        int s,t;
        cin >> s >> t;
        s--; t--;
        int f = g.solve(s,t);
        cout << f << endl;
        g.doit();
    }
}