#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
using vb = vector<bool>;
using vi = vector<int>;
using vl = vector<long long>;
using vvb = vector<vector<bool>>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<long long>>;
using vpii = vector<pair<int, int>>;
using mii = map<int, int>;
template <typename... ArgTypes>
void print(ArgTypes... args);
template <typename... ArgTypes>
void input(ArgTypes &...args);
template <>
void print() {}
template <>
void input() {}
template <typename T, typename... ArgTypes>
void print(T t, ArgTypes... args) {
  cout << t;
  print(args...);
}
template <typename T, typename... ArgTypes>
void input(T &t, ArgTypes &...args) {
  cin >> t;
  input(args...);
}
int main() {
  ios_base::sync_with_stdio(0);
  int n, m, k;
  vvi adj;
  vi shortest;
  vi path;
  vector<unordered_set<int>> nextNode;
  cin >> n >> m;
  adj = vvi(n);
  shortest = vi(n, INT32_MAX);
  nextNode = vector<unordered_set<int>>(n);
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;
    adj[y].push_back(x);
  }
  cin >> k;
  path = vi(k);
  for (int i = 0; i < k; i++) {
    cin >> path[i];
    path[i]--;
  }
  queue<pair<pii, int>> Q;
  Q.push({{path.back(), 0}, -1});
  while (!Q.empty()) {
    int level = Q.front().first.second;
    int node = Q.front().first.first;
    int parent = Q.front().second;
    Q.pop();
    if (shortest[node] > level) {
      nextNode[node].clear();
      shortest[node] = level;
      nextNode[node].insert(parent);
      for (auto x : adj[node]) Q.push({{x, level + 1}, node});
    } else if (shortest[node] == level)
      nextNode[node].insert(parent);
  }
  int mini = 0, maxi = 0;
  for (int i = 0; i < k - 1; i++) {
    if (nextNode[path[i]].find(path[i + 1]) != nextNode[path[i]].end()) {
      if (nextNode[path[i]].size() != 1) maxi++;
    } else {
      mini++;
      maxi++;
    }
  }
  cout << mini << " " << maxi << endl;
}
