#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)(1e9 + 7);
const int inf = (int)INFINITY;
const long long INF = (long long)INFINITY;
const int MAX = (int)(1e6 + 5);
vector<int> g[MAX], gr[MAX], dis(MAX, inf), paths(MAX, 0);
void bfs(int s) {
  queue<int> q;
  dis[s] = 0;
  q.push(s);
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int v : gr[u]) {
      if (dis[v] > dis[u] + 1) {
        dis[v] = dis[u] + 1;
        paths[v] = 1;
        q.push(v);
      } else if (dis[v] == dis[u] + 1) {
        paths[v]++;
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    gr[v].push_back(u);
  }
  int k;
  cin >> k;
  vector<long long> p(k);
  for (long long i = 0; i < (k); ++i) cin >> p[i];
  int d = p[k - 1];
  bfs(d);
  int mn = 0, mx = 0;
  for (int i = 1; i < k; ++i) {
    int u = p[i - 1], v = p[i];
    if (dis[v] != dis[u] - 1)
      ++mn, ++mx;
    else if (paths[u] > 1)
      ++mx;
  }
  cout << mn << ' ' << mx;
  cout << '\n';
  return 0;
}
