#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int n, m, k, menor, mayor;
vector<bool> vis;
vector<int> p, dist;
vector<vector<int>> adj, adjReversa;
void leerDatos() {
  cin >> n >> m;
  vis.resize(n + 1, false);
  dist.resize(n + 1);
  adj.resize(n + 1);
  adjReversa.resize(n + 1);
  for (int i = 0; i < m; ++i) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adjReversa[v].push_back(u);
  }
  cin >> k;
  p.resize(k);
  for (int i = 0; i < k; ++i) {
    cin >> p[i];
  }
}
void bfs(int o) {
  vis[o] = true;
  dist[o] = 0;
  queue<int> cola;
  cola.push(o);
  while (!cola.empty()) {
    int a = cola.front();
    cola.pop();
    for (auto h : adjReversa[a]) {
      if (!vis[h]) {
        vis[h] = true;
        dist[h] = dist[a] + 1;
        cola.push(h);
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  leerDatos();
  bfs(p[k - 1]);
  for (int i = 0; i < k - 1; ++i) {
    int minNextDist = INF, caminosBuenos = 0;
    for (auto next : adj[p[i]]) {
      if (dist[next] < minNextDist) {
        minNextDist = dist[next];
        caminosBuenos = 1;
      } else if (dist[next] == minNextDist)
        ++caminosBuenos;
    }
    if (dist[p[i + 1]] > minNextDist) {
      ++menor;
      ++mayor;
    } else if (caminosBuenos > 1) {
      ++mayor;
    }
  }
  cout << menor << " " << mayor << '\n';
  return 0;
}
