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 <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>
#include <queue>

using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);

#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, s, n) for (int i = (s); i < (int)(n); i++)
#define FOREQ(i, s, n) for (int i = (s); i <= (int)(n); i++)
#define FORIT(it, c) for (__typeof((c).begin())it = (c).begin(); it != (c).end(); it++)
#define MEMSET(v, h) memset((v), h, sizeof(v))


typedef int Weight;
struct Edge {
  int src;
  int dest;
  Weight weight;
  Edge(int src, int dest, Weight weight) : src(src), dest(dest), weight(weight) {;}
  bool operator<(const Edge &rhs) const {
    if (weight != rhs.weight) { return weight > rhs.weight; }
    if (src != rhs.src) { return src < rhs.src; }
    return dest < rhs.dest;
  }
};
typedef vector<Edge> Edges;
typedef vector<Edges> Graph;
typedef vector<Weight> Array;
typedef vector<Array> Matrix;

void PrintMatrix(const Matrix &matrix) {
  for (int y = 0; y < (int)matrix.size(); y++) {
    for (int x = 0; x < (int)matrix[y].size(); x++) {
      printf("%d ", matrix[y][x]);
    }
    puts("");
  }
}


int MaxFlow(const Graph &g, int s, int t, Matrix &flow) {
  const int n = g.size();
  Matrix capacity(n, Array(n, 0));
  flow = Matrix(n, Array(n, 0));
  for (int i = 0; i < n; i++) {
    for (Edges::const_iterator it = g[i].begin(); it != g[i].end(); it++) {
      capacity[it->src][it->dest] = it->weight;
    }
  }
  int ret = 0;
  vector<int> parent(n);
  while (true) {
    fill(parent.begin(), parent.end(), -1);
    queue<Edge> que;
    que.push(Edge(s, s, 0));
    while (!que.empty()) {
      Edge node = que.front();
      que.pop();
      if (parent[node.dest] != -1) { continue; }
      parent[node.dest] = node.src;
      if (node.dest == t) { break; }
      int from = node.dest;
      for (Edges::const_iterator it = g[from].begin(); it != g[from].end(); it++) {
        int to = it->dest;
        if (capacity[from][to] == 0 || parent[to] != -1) { continue; }
        que.push(Edge(from, to, 0));
      }
    }
    if (parent[t] == -1) { break; }
    Weight f = 2000000000;
    int from = parent[t];
    int to = t;
    while (from != to) {
      f = min(f, capacity[from][to]);
      from = parent[from];
      to = parent[to];
    }
    from = parent[t];
    to = t;
    while (from != to) {
      capacity[from][to] -= f;
      capacity[to][from] += f;
      flow[from][to] += f;
      flow[to][from] -= f;
      from = parent[from];
      to = parent[to];
    }
    ret += f;
  }
  return ret;
}

void AddEdge(Graph &g, int from, int to, Weight capacity) {
  g[from].push_back(Edge(from, to, capacity));
  g[to].push_back(Edge(to, from, capacity));
}

int main() {
  int n, m;
  while (scanf("%d %d", &n, &m) > 0) {
    Graph g(n);
    vector<Edge> edges;
    REP(i, m) {
      int f, t;
      scanf("%d %d", &f, &t);
      f--; t--;
      AddEdge(g, t, f, 1);
      edges.push_back(Edge(f, t, 1));
    }
    int s, t;
    scanf("%d %d", &s, &t);
    s--; t--;
    Matrix flow;
    int f = MaxFlow(g, s, t, flow);
    vector<int> ans;
    REP(i, m) {
      if (flow[edges[i].dest][edges[i].src] == 1) { ans.push_back(i + 1); }
    }
    printf("%d\n%d\n", f, (int)ans.size());
    FORIT(it, ans) {
      printf("%d\n", *it);
    }
  }
}