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:
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<climits>
using namespace std;

const int NV = 305;
const int NE = 45000;

struct ISAP {
    int n, size;
    int head[NV];
    int dis[NV], gap[NV], pre[NV], cur[NV];
    int maxflow;

    struct Edge {
        int v, w, next;
        Edge () {}
        Edge (int V, int NEXT, int W = 0) : v(V), next(NEXT), w(W) { }
    }E[NE];

    void init(int x) {
        n = x, size = 0;
        for (int i = 0; i <= n; i++) {
            head[i] = -1;
        }
    }

    inline void insert(int u, int v, int w = 0) {
        E[size] = Edge(v, head[u], w);
        head[u] = size++;
        E[size] = Edge(u, head[v], w); //豬??蜿榊髄蟒コ霎ケ
        head[v] = size++;
    }

    int MaxFlow(int src, int des) {
        maxflow = 0;
        gap[0] = n;
        for (int i = 0; i <= n; i++) {
            dis[i] = gap[i] = 0;
        }
        for (int i = 0; i <= n; i++) {
            cur[i] = head[i];
        }
        int u = pre[src] = src;
        int aug = -1;
        while (dis[src] < n) {//扈捺據譚。莉カ1
loop:
            for (int &i = cur[u]; i != -1; i = E[i].next) {
                int v = E[i].v;
                if (E[i].w && dis[u] == dis[v] + 1) {
                    aug = min(aug, E[i].w);
                    pre[v] = u;
                    u = v;
                    if (v == des) {//謇セ蛻ー荳?擅蠅槫ケソ霍ッ?梧峩譁ー
                        maxflow += aug;
                        // //菫ョ謾ケ谿倶ス咏ス醍サ?
                        for (u = pre[u]; v != src; v = u, u = pre[u]) {
                            E[cur[u]].w -= aug;//豁」蜷題セケ
                            E[cur[u]^1].w += aug;//蜿榊髄霎ケ
                        }
                        aug = INT_MAX;
                    }//if
                    goto loop;
                }//for
            }//for
            //蟇サ謇セ譛?ー冗噪霍晉ヲサ譬?捷?悟ケカ菫ョ謾ケ蠖灘燕轤ケ    荳コ譛?ー冗噪譬?捷+1
            int mdis = n;
            for (int i = head[u]; i != -1; i = E[i].next) {
                int v = E[i].v;
                if (E[i].w && mdis > dis[v]) {
                    cur[u] = i;
                    mdis = dis[v];
                }
            }//for

            //GAP 莨伜喧 譁ュ螻ょ?霍ウ蜃コ 扈捺據譚。莉カ2
            if ((--gap[dis[u]]) == 0) {
                break;
            }
            gap[dis[u] = mdis + 1]++;//蟆?凶譛芽ッ・譬?捷逧?焚驥丞刈1
            u = pre[u];//蠖灘燕闃らせ 霑∫ァサ荳?クェ
        }//while
        return maxflow;
    }//ISAP
}G;

int main() {
    int n, m;
    scanf("%d%d", &n, &m);
	G.init(n);
	while (m--) {
		int u, v;
		scanf("%d%d", &u, &v);
		if (u == v) {
			continue;
		}
		G.insert(u, v, 1);
	}
	int s, t;
	scanf("%d%d", &s, &t);
	printf("%d\n", G.MaxFlow(s, t));
	
	int total = 0, ans[10005];

	for (int i = 0; i < G.size; i++) {
		if (G.E[i].w > 1) //螯よ棡闃らせ霑俶怏谿倶ス呻シ域イ。豬∬ソ?シ?
			if (i % 2 == 0)
				ans[total++] = i/2+1; //螳樣刔霎ケ莉?蠑?ァ区?隶ー
	}

	printf("%d\n", total);
	for (int i = 0; i < total; i++) {
		printf("%d\n", ans[i]);
	}

	return 0;
}