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 _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#define LINF 0x3f3f3f3f3f3f3f3f
#include <cstdio>
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>
#include <cctype>
#include <utility>
 
using namespace std;
 
typedef long long ll;
typedef pair <int,int> P;
typedef pair <int,P > PP;
 
const static int tx[] = {0,1,1,1,0,-1,-1,-1};
const static int ty[] = {-1,-1,0,1,1,1,0,-1};
 
static const double EPS = 1e-8;

int path[301][301];

class Edge{
public:
  int _to;
  int _capacity;
  int _reverse;
  int _id;
  Edge(int to,int capacity,int reverse) :
    _to(to), _capacity(capacity), _reverse(reverse) {}
  Edge(int to,int capacity,int reverse,int id) :
    _to(to), _capacity(capacity), _reverse(reverse),_id(id) {}
};

class FordFulkerson {
private:
  int _n;
  bool *_used;
  vector<Edge>* _edges;
  void fill_used(){
    fill(_used,_used + (_n+1) ,false);
  }
public:
  FordFulkerson(int n){
    _n = n;
    _edges = new vector<Edge>[n+1];
    _used = new bool[n+1]();
  }

  void add_edge(int from,int to,int capacity,int id){
    _edges[from].push_back(Edge(to,capacity,_edges[to].size(),id));
    _edges[to].push_back(Edge(from,capacity,_edges[from].size()-1,-id));
  }

  int dfs(int current,int sink,int flow){
    if(current == sink) return flow;
    _used[current] = true;
    for(int i=0;i<_edges[current].size();i++){
      Edge& e = _edges[current][i];
      int to = e._to;
      if(_used[to] || e._capacity <= 0) continue;

      int d = dfs(to,sink,min(flow,e._capacity));
      if(d <= 0) continue;
      
      e._capacity -= d;
      _edges[to][e._reverse]._capacity += d;
      path[current][to] -= d;
      path[to][current] += d;
      return d;
    }
    
    return 0;
  }

  int compute_max_flow(int source,int sink){
    int res = 0;
    while(true){
      fill_used();
      int tmp = dfs(source,sink,INF);
      if(tmp == 0) break;
      res += tmp;
    }
    return res;
  }

  set<int> compute_reverse(const vector<P>& roads,int path[301][301]){
    set<int> res;
    for(int road_i = 0; road_i < roads.size();road_i++){
      int from = roads[road_i].first;
      int to = roads[road_i].second;

      if(path[to][from] == 0){
         res.insert(road_i + 1);
      }
    }
    return res;
  }
};

int main(){
  int num_of_crossings;
  int num_of_roads;
  while(~scanf("%d %d",
               &num_of_crossings,
               &num_of_roads)){
    
    FordFulkerson fordfulkerson(num_of_crossings);

    memset(path,0,sizeof(path));
    vector<P> roads;
    for(int road_i = 1; road_i <= num_of_roads; road_i++){
      int from,to;
      scanf("%d %d",&from,&to);
      fordfulkerson.add_edge(from,to,1,road_i);
      path[from][to] = path[to][from] = 1;
      roads.push_back(P(from,to));
    }

    int source,sink;
    scanf("%d %d",&source,&sink);
    cout << fordfulkerson.compute_max_flow(source,sink) << endl;
    
    set<int> res = fordfulkerson.compute_reverse(roads,path);
    cout << res.size() << endl;
    for(set<int>::iterator it = res.begin(); it != res.end(); it++){
      cout << *it << endl;
    }
  }
}