#include <bits/stdc++.h>
using namespace std;
namespace BFS {
void bfs(vector<vector<long long int> >& adj, vector<long long int>& val,
         long long int s = 1) {
  val[s] = 0;
  queue<long long int> bfs;
  bfs.push(s);
  while (!bfs.empty()) {
    long long int x = bfs.front();
    bfs.pop();
    for (auto y : adj[x]) {
      if (val[y] > val[x] + 1) {
        val[y] = val[x] + 1;
        bfs.push(y);
      }
    }
  }
}
}  // namespace BFS
vector<vector<long long int> > adj(200005);
vector<vector<long long int> > radj(200005);
vector<long long int> val(200005, 100000000000000000);
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  long long int m;
  cin >> n >> m;
  for (long long int i = 0; i < m; i++) {
    long long int x, y;
    cin >> x >> y;
    adj[x].push_back(y);
    radj[y].push_back(x);
  }
  vector<long long int> path;
  long long int k;
  cin >> k;
  for (long long int i = 0; i < k; i++) {
    long long int x;
    cin >> x;
    path.push_back(x);
  }
  BFS::bfs(radj, val, path.back());
  long long int mn = 0, mx = 0;
  for (long long int i = 0; i < k - 1; i++) {
    long long int x = path[i];
    long long int next = path[i + 1];
    vector<long long int> poss;
    for (auto y : adj[x]) {
      if (val[y] == val[x] - 1) {
        poss.push_back(y);
      }
    }
    mn++;
    mx++;
    for (auto y : poss) {
      if (y == next) {
        mn--;
        break;
      }
    }
    if (poss.size() == 1 && poss[0] == next) mx--;
  }
  cout << mn << " " << mx;
}
