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:
/*
 * Author:  Teletubbies
 * Created Time:  2012年08月29日 星期三 12&#26102;39分28秒
 * File Name: e.cpp
 */
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <time.h>
#include <cctype>
#include <functional>
#include <deque>
#include <iomanip>
#include <bitset>
#include <assert.h>
#include <numeric>
#include <sstream>
#include <utility>

#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(a) (a).begin(),(a).end()
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define FORD(i,a,b) for (int i=(a); i>=(b); i--)
#define REP(i,b) FOR(i,0,b)
#define sf scanf
#define pf printf
using namespace std;
const int maxint = -1u>>1;
const double pi = 3.14159265358979323;
const double eps = 1e-8;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<int>::iterator vit;
#define maxn 310
#define maxm 500000
int eh[maxn], tot, cur[maxn];
const int inf = 1 << 30;
int dist[maxn];
int s, t;
int n, m;

struct Edge {
    int u, v, cap, flow, next;
}et[maxm];

void init() {
    tot = 0;
    memset(eh, -1, sizeof(eh));
}

void add(int u, int v, int cap, int flow) {
    Edge e = {u, v, cap, flow, eh[u]};
    et[tot] = e;
    eh[u] = tot++;
}

void addedge(int u, int v, int cap) {
    add(u, v, cap, 0), add(v, u, cap, 0);
}
    
bool bfs() {
    int que[maxn];
    int head = 0, tail = 0;
    memset(dist, -1, sizeof(dist));
    dist[t] = 0;
    que[tail++] = t;
    while(head < tail && dist[s] == -1) {
        int u = que[head++];
        for(int i = eh[u]; i != -1; i = et[i].next) {
            int v = et[i].v;
            if(et[i^1].cap > et[i^1].flow && dist[v] == -1) {
                dist[v] = dist[u] + 1;
                que[tail++] = v;
            }
        }
    }
    return dist[s] != -1;
}

int dfs(int u, int d) {
    if(u == t) return d;
    int l = d;
    //cout << u << "********" <<  endl;
    for(int &i = cur[u]; i != -1; i = et[i].next) {
        int v = et[i].v;
        if(et[i].cap > et[i].flow && dist[u] == dist[v] + 1) {
            //cout << v << " " << d << endl;
            int tmp = dfs(v, min(l, et[i].cap - et[i].flow));
            //cout << v << "tmp = " << tmp << endl;
            et[i].flow += tmp;
            et[i^1].flow -= tmp;
            l -= tmp;
            if(l == 0) break;
        }
    }
    //cout << d -  l << "asdfads" << endl;
    return d - l;
}

int Dinic() {
    int flow = 0;
    while(bfs()) {
        //cout << "dist" << endl;
        //for(int i = 1; i <= n; i++) {
            //cout << dist[i] << endl;
        //}
        for(int i = 1; i <= n; i++) cur[i] = eh[i];
        flow += dfs(s, inf);
    }
    return flow;
}

int main() 
{
    //freopen("in1.txt", "r", stdin);
    //freopen("E.out3", "w", stdout);
    
    while(~scanf("%d%d", &n, &m)) {
        init();
        int u, v;
        for(int i = 0; i < m; i++) {
            scanf("%d%d", &u, &v);
            addedge(u, v, 1);
            //cout << u << " " << v << endl;
        }
        scanf("%d%d", &s, &t);
        int ans = Dinic();
        printf("%d\n", ans);
        vector<int> vec;
        vec.clear();
        //cout << tot << endl;
        for(int i = 0; i < tot; i += 2) {
            //cout << et[i].u << " " << et[i].v << " " << et[i].flow << endl;
            if(et[i].flow < 0) {
                vec.pb(i / 2 + 1);
            }
        }
        printf("%d\n", vec.size());
        for(int i = 0; i < vec.size(); i++) {
            printf("%d\n", vec[i]);
        }
        break;
    }
    
    //while(1);
    return 0;
}