#include <bits/stdc++.h>
using namespace std;
vector<int> graph[200010];
int main() {
  int n, m;
  cin >> n >> m;
  while (m--) {
    int a, b;
    cin >> a >> b;
    graph[b].push_back(a);
  }
  map<int, vector<int> > mp;
  map<int, int> dist;
  for (int i = 1; i <= n; i++) {
    dist[i] = INT_MAX;
  }
  int k;
  cin >> k;
  int p[k];
  for (int i = 0; i < k; i++) {
    cin >> p[i];
  }
  dist[p[k - 1]] = 0;
  queue<int> q;
  q.push(p[k - 1]);
  while (!(q.empty())) {
    int x = q.front();
    q.pop();
    for (int i = 0; i < graph[x].size(); i++) {
      int ind = graph[x][i];
      if (dist[ind] >= dist[x] + 1) {
        if (dist[ind] > dist[x] + 1) q.push(ind);
        dist[ind] = dist[x] + 1;
        mp[ind].push_back(x);
      }
    }
  }
  int mn = 0, mx = 0;
  for (int i = 1; i < k; i++) {
    int temp = 0, temp1 = 0;
    for (int j = 0; j < mp[p[i - 1]].size(); j++) {
      int ind = mp[p[i - 1]][j];
      if (p[i] == ind) {
        temp = 1;
      } else {
        temp1 = 1;
      }
      if (temp == 1 && temp1 == 1) {
        break;
      }
    }
    if (temp == 0) {
      mn++;
    }
    if (temp1 > 0) {
      mx++;
    }
  }
  cout << mn << " " << mx << endl;
}
