#include <bits/stdc++.h>
using namespace std;
int n, m, K;
vector<int> adj[200123], p, dist, adjn[200123];
void bfs() {
  queue<int> q;
  dist = vector<int>(n + 1, 1000000123);
  dist[p.back()] = 0;
  q.push(p.back());
  int u, v, idx;
  while (!q.empty()) {
    u = q.front();
    q.pop();
    for (int v : adj[u]) {
      if (dist[v] == 1000000123) {
        dist[v] = dist[u] + 1;
        q.push(v);
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  int u, v;
  cin >> n >> m;
  while (m--) {
    cin >> u >> v;
    adj[v].emplace_back(u);
    adjn[u].emplace_back(v);
  }
  cin >> K;
  p = vector<int>(K + 1);
  for (int i = 1; i <= K; ++i) {
    cin >> p[i];
  }
  p[0] = 1000000123;
  bfs();
  int menor = 0, maior = 0;
  for (int i = 1; i < K; ++i) {
    u = p[i], v = p[i + 1];
    int jamenor = 0, jamaior = 0;
    if (dist[u] <= dist[v]) {
      ++menor;
      ++maior;
      continue;
    }
    for (int x : adjn[u]) {
      if (dist[u] == (dist[x] + 1)) {
        if (x == v && !jamenor) {
          jamenor = 1;
        } else if (x != v && !jamaior) {
          jamaior = 1;
          ++maior;
        }
      }
    }
    if (!jamenor) ++menor;
  }
  cout << menor << ' ' << maior << '\n';
  return 0;
}
