#include <bits/stdc++.h>
const long double PI = 3.141592653589793236L;
using namespace std;
const int maxN = 2e5;
vector<int> adj[maxN + 1];
vector<int> radj[maxN + 1];
vector<bool> vis(maxN + 1, false);
vector<int> dis(maxN + 1);
vector<int> path_count(maxN + 1, 0);
void bfs(int v) {
  queue<int> q;
  q.push(v);
  vis[v] = true;
  while (q.size()) {
    v = q.front();
    q.pop();
    for (int x : radj[v]) {
      if (vis[x]) {
        if (dis[v] + 1 == dis[x]) {
          path_count[x]++;
        }
      } else if (!vis[x]) {
        vis[x] = true;
        dis[x] = dis[v] + 1;
        path_count[x]++;
        q.push(x);
      }
    }
  }
}
void solve() {
  int n, m;
  cin >> n >> m;
  int u, v;
  for (int i = 0; i < m; i++) {
    cin >> u >> v;
    adj[u].push_back(v);
    radj[v].push_back(u);
  }
  int P;
  cin >> P;
  vector<int> p(P);
  for (int i = 0; i < P; i++) {
    cin >> p[i];
  }
  bfs(p[P - 1]);
  for (int i = 1; i <= n; i++) {
  }
  int min_changes = 0;
  int max_changes = 0;
  for (int i = 0; i < P; i++) {
    if (dis[p[i]] == P - i - 1) {
      break;
    }
    if (dis[p[i]] == dis[p[i + 1]] + 1) {
      continue;
    }
    min_changes++;
  }
  for (int i = 0; i < P - 1; i++) {
    if (path_count[p[i]] != 1) {
      max_changes++;
      continue;
    } else if (path_count[p[i]] == 1 && dis[p[i]] == dis[p[i + 1]] + 1) {
      continue;
    }
    max_changes++;
  }
  cout << min_changes << " " << max_changes << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
