#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int n, m;
int k;
vector<int> v[N], g[N];
vector<int> a;
queue<int> q;
int vis[N];
int dis[N];
vector<int> ans(2);
void bfs(int x) {
  q.push(x);
  vis[x] = 1;
  while (!q.empty()) {
    int pos = q.front();
    q.pop();
    int t = g[pos].size();
    for (int i = 0; i < t; i++) {
      if (vis[g[pos][i]]) {
        continue;
      }
      vis[g[pos][i]] = 1;
      q.push(g[pos][i]);
      dis[g[pos][i]] = dis[pos] + 1;
    }
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int t1, t2;
    cin >> t1 >> t2;
    v[t1].push_back(t2);
    g[t2].push_back(t1);
  }
  cin >> k;
  for (int i = 0; i < k; i++) {
    int temp;
    cin >> temp;
    a.push_back(temp);
  }
  bfs(a[k - 1]);
  for (int i = 0; i < k - 1; i++) {
    vector<int> flag(2);
    int b = a[i];
    int t = v[b].size();
    for (int j = 0; j < t; j++) {
      if (dis[v[b][j]] + 1 == dis[b] && v[b][j] == a[i + 1]) {
        flag[0]++;
      } else if (dis[v[b][j]] + 1 == dis[b] && v[b][j] != a[i + 1]) {
        flag[1]++;
      }
    }
    ans[0] += (flag[0] ? 0 : 1);
    ans[1] += (flag[0] && !flag[1] ? 0 : 1);
  }
  cout << ans[0] << " " << ans[1] << endl;
  return 0;
}
